Commits

Anonymous committed 67f1b76 Merge

fwk160: Sync to DEV300_m94

Comments (0)

Files changed (168)

 0375d65fa3bd7387e009a85d2228394300e2bc6f DEV300_m92
 34ed0299acd745f76c9c1245f6c661de3cfa1b29 OOO330_m14
 2c70ae736e88ce4d9e9f0ffa08952f1987924bcd DEV300_m93
+a8b599672831a104faa85ad5ece8d67b4b0123ea OOO330_m15
+6a2043940003c27c523e35a582335d2982f6ef5f DEV300_m94

comphelper/source/officeinstdir/officeinstallationdirectories.cxx

 /*************************************************************************
  *
  * 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
 
 OfficeInstallationDirectories::OfficeInstallationDirectories(
         const uno::Reference< uno::XComponentContext > & xCtx )
-: m_aOfficeDirMacro( RTL_CONSTASCII_USTRINGPARAM( "$(baseinsturl)" ) ),
+: m_aOfficeBrandDirMacro( RTL_CONSTASCII_USTRINGPARAM( "$(brandbaseurl)" ) ),
+  m_aOfficeBaseDirMacro( RTL_CONSTASCII_USTRINGPARAM( "$(baseinsturl)" ) ),
   m_aUserDirMacro( RTL_CONSTASCII_USTRINGPARAM( "$(userdataurl)" ) ),
   m_xCtx( xCtx ),
-  m_pOfficeDir( 0 ),
+  m_pOfficeBrandDir( 0 ),
+  m_pOfficeBaseDir( 0 ),
   m_pUserDir( 0 )
 {
 }
 // virtual
 OfficeInstallationDirectories::~OfficeInstallationDirectories()
 {
+    delete m_pOfficeBrandDir;
+    delete m_pOfficeBaseDir;
+    delete m_pUserDir;
 }
 
 //=========================================================================
 OfficeInstallationDirectories::getOfficeInstallationDirectoryURL()
     throw ( uno::RuntimeException )
 {
-    // late init m_pOfficeDir and m_pUserDir
     initDirs();
-    return rtl::OUString( *m_pOfficeDir );
+    return rtl::OUString( *m_pOfficeBrandDir );
 }
 
 //=========================================================================
 OfficeInstallationDirectories::getOfficeUserDataDirectoryURL()
     throw ( uno::RuntimeException )
 {
-    // late init m_pOfficeDir and m_pUserDir
     initDirs();
     return rtl::OUString( *m_pUserDir );
 }
 {
     if ( URL.getLength() > 0 )
     {
-        // late init m_pOfficeDir and m_pUserDir
         initDirs();
 
         rtl::OUString aCanonicalURL( URL );
         makeCanonicalFileURL( aCanonicalURL );
 
-        sal_Int32 nIndex = aCanonicalURL.indexOf( *m_pOfficeDir );
+        sal_Int32 nIndex = aCanonicalURL.indexOf( *m_pOfficeBrandDir );
         if ( nIndex  != -1 )
         {
             return rtl::OUString(
                 URL.replaceAt( nIndex,
-                               m_pOfficeDir->getLength(),
-                               m_aOfficeDirMacro ) );
+                               m_pOfficeBrandDir->getLength(),
+                               m_aOfficeBrandDirMacro ) );
         }
         else
         {
-            nIndex = aCanonicalURL.indexOf( *m_pUserDir );
+            nIndex = aCanonicalURL.indexOf( *m_pOfficeBaseDir );
             if ( nIndex  != -1 )
             {
                 return rtl::OUString(
                     URL.replaceAt( nIndex,
-                                   m_pUserDir->getLength(),
-                                   m_aUserDirMacro ) );
+                                   m_pOfficeBaseDir->getLength(),
+                                   m_aOfficeBaseDirMacro ) );
+            }
+            else
+            {
+                nIndex = aCanonicalURL.indexOf( *m_pUserDir );
+                if ( nIndex  != -1 )
+                {
+                    return rtl::OUString(
+                        URL.replaceAt( nIndex,
+                                       m_pUserDir->getLength(),
+                                       m_aUserDirMacro ) );
+                }
             }
         }
     }
 {
     if ( URL.getLength() > 0 )
     {
-        sal_Int32 nIndex = URL.indexOf( m_aOfficeDirMacro );
+        sal_Int32 nIndex = URL.indexOf( m_aOfficeBrandDirMacro );
         if ( nIndex != -1 )
         {
-            // late init m_pOfficeDir and m_pUserDir
             initDirs();
 
             return rtl::OUString(
                 URL.replaceAt( nIndex,
-                               m_aOfficeDirMacro.getLength(),
-                               *m_pOfficeDir ) );
+                               m_aOfficeBrandDirMacro.getLength(),
+                               *m_pOfficeBrandDir ) );
         }
         else
         {
-            nIndex = URL.indexOf( m_aUserDirMacro );
+            nIndex = URL.indexOf( m_aOfficeBaseDirMacro );
             if ( nIndex != -1 )
             {
-                // late init m_pOfficeDir and m_pUserDir
                 initDirs();
 
                 return rtl::OUString(
                     URL.replaceAt( nIndex,
-                                   m_aUserDirMacro.getLength(),
-                                   *m_pUserDir ) );
+                                   m_aOfficeBaseDirMacro.getLength(),
+                                   *m_pOfficeBaseDir ) );
+            }
+            else
+            {
+                nIndex = URL.indexOf( m_aUserDirMacro );
+                if ( nIndex != -1 )
+                {
+                    initDirs();
+
+                    return rtl::OUString(
+                        URL.replaceAt( nIndex,
+                                       m_aUserDirMacro.getLength(),
+                                       *m_pUserDir ) );
+                }
             }
         }
     }
 
 void OfficeInstallationDirectories::initDirs()
 {
-    if ( m_pOfficeDir == 0 )
+    if ( m_pOfficeBrandDir == 0 )
     {
         osl::MutexGuard aGuard( m_aMutex );
-        if ( m_pOfficeDir == 0 )
+        if ( m_pOfficeBrandDir == 0 )
         {
-            m_pOfficeDir = new rtl::OUString;
-            m_pUserDir   = new rtl::OUString;
+            m_pOfficeBrandDir = new rtl::OUString;
+            m_pOfficeBaseDir  = new rtl::OUString;
+            m_pUserDir        = new rtl::OUString;
 
             uno::Reference< util::XMacroExpander > xExpander;
 
 
             if ( xExpander.is() )
             {
-                *m_pOfficeDir =
+                *m_pOfficeBrandDir =
+                    xExpander->expandMacros(
+                         rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "$BRAND_BASE_DIR" ) ) );
+
+                OSL_ENSURE( m_pOfficeBrandDir->getLength() > 0,
+                            "Unable to obtain office brand installation directory!" );
+
+                makeCanonicalFileURL( *m_pOfficeBrandDir );
+
+                *m_pOfficeBaseDir =
                     xExpander->expandMacros(
                         rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
                             "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap" ) ":BaseInstallation}" ) ) );
 
-                OSL_ENSURE( m_pOfficeDir->getLength() > 0,
-                        "Unable to obtain office installation directory!" );
+                OSL_ENSURE( m_pOfficeBaseDir->getLength() > 0,
+                            "Unable to obtain office base installation directory!" );
 
-                makeCanonicalFileURL( *m_pOfficeDir );
+                makeCanonicalFileURL( *m_pOfficeBaseDir );
 
                 *m_pUserDir =
                     xExpander->expandMacros(
                             "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap" ) ":UserInstallation}" ) ) );
 
                 OSL_ENSURE( m_pUserDir->getLength() > 0,
-                        "Unable to obtain office user data directory!" );
+                            "Unable to obtain office user data directory!" );
 
                 makeCanonicalFileURL( *m_pUserDir );
             }

comphelper/source/officeinstdir/officeinstallationdirectories.hxx

 /*************************************************************************
  *
  * 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
 private:
     void initDirs();
 
-    rtl::OUString                                   m_aOfficeDirMacro;
+    rtl::OUString                                   m_aOfficeBrandDirMacro;
+    rtl::OUString                                   m_aOfficeBaseDirMacro;
     rtl::OUString                                   m_aUserDirMacro;
     com::sun::star::uno::Reference<
         com::sun::star::uno::XComponentContext >    m_xCtx;
-    rtl::OUString *                                 m_pOfficeDir;
+    rtl::OUString *                                 m_pOfficeBrandDir;
+    rtl::OUString *                                 m_pOfficeBaseDir;
     rtl::OUString *                                 m_pUserDir;
 };
 
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        echo "$as_me:$LINENO: checking for neon >= 0.24.0" >&5
-echo $ECHO_N "checking for neon >= 0.24.0... $ECHO_C" >&6
-
-        if $PKG_CONFIG --exists "neon >= 0.24.0" ; then
+        echo "$as_me:$LINENO: checking for neon >= 0.26.0" >&5
+echo $ECHO_N "checking for neon >= 0.26.0... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "neon >= 0.26.0" ; then
             echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
             succeeded=yes
 
             echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5
 echo $ECHO_N "checking NEON_CFLAGS... $ECHO_C" >&6
-            NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.24.0"`
+            NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.26.0"`
             echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5
 echo "${ECHO_T}$NEON_CFLAGS" >&6
 
             echo "$as_me:$LINENO: checking NEON_LIBS" >&5
 echo $ECHO_N "checking NEON_LIBS... $ECHO_C" >&6
-            NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.24.0"`
+            NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.26.0"`
             echo "$as_me:$LINENO: result: $NEON_LIBS" >&5
 echo "${ECHO_T}$NEON_LIBS" >&6
         else
             NEON_LIBS=""
             ## If we have a custom action on failure, don't print errors, but
             ## do set a variable so people can do so.
-            NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.24.0"`
+            NEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "neon >= 0.26.0"`
 
         fi
 
   if test $succeeded = yes; then
      :
   else
-     { { echo "$as_me:$LINENO: error: you need neon >= 0.24.x for system-neon" >&5
-echo "$as_me: error: you need neon >= 0.24.x for system-neon" >&2;}
+     { { echo "$as_me:$LINENO: error: you need neon >= 0.26.x for system-neon" >&5
+echo "$as_me: error: you need neon >= 0.26.x for system-neon" >&2;}
    { (exit 1); exit 1; }; }
   fi
 
 if test -n "$with_system_neon" -o -n "$with_system_libs" && \
 	test "$with_system_neon" != "no"; then
         AC_MSG_RESULT([external])
-        PKG_CHECK_MODULES(NEON, neon >= 0.24.0, , AC_MSG_ERROR([you need neon >= 0.24.x for system-neon]))
+        PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon]))
         NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
         NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1"
         SYSTEM_NEON=YES

cppuhelper/source/gcc3.map

 
 UDK_3.7 { # OOo 3.4
     global:
-        _ZN4cppu18OPropertySetHelper29setDependentFastPropertyValueElRKN3com3sun4star3uno3AnyE;
-        _ZN4cppu18OPropertySetHelper29setDependentFastPropertyValueEiRKN3com3sun4star3uno3AnyE;
+        _ZN4cppu18OPropertySetHelper29setDependentFastPropertyValueE?RKN3com3sun4star3uno3AnyE;
 } UDK_3.6;
 

framework/inc/helper/ilayoutnotifications.hxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * 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_

framework/inc/services.h

 #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
 #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
 

framework/inc/services/layoutmanager.hxx

  *
  * 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
 #include <uielement/menubarmanager.hxx>
 #include <uiconfiguration/windowstateconfiguration.hxx>
 #include <classes/addonsoptions.hxx>
+#include <uielement/panelwindow.hxx>
+#include <uielement/uielement.hxx>
+#include <helper/ilayoutnotifications.hxx>
 
 //_________________________________________________________________________________________________________________
 //	interface includes
 //	other includes
 //_________________________________________________________________________________________________________________
 #include <cppuhelper/propshlp.hxx>
-#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/implbase8.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 #include <comphelper/propertycontainer.hxx>
 #include <vcl/wintypes.hxx>
 class MenuBar;
 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;
                           // 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:
             // 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);
             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
 		    //---------------------------------------------------------------------------------------------------------
             virtual void SAL_CALL addLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException);
             DECL_LINK( MenuBarClose, MenuBar * );
 	        DECL_LINK( WindowEventListener, VclSimpleEvent* );
 
-            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 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;
-            };
+		    //---------------------------------------------------------------------------------------------------------
+            //  ILayoutNotifications
+		    //---------------------------------------------------------------------------------------------------------
+            virtual void requestLayout( Hint eHint );
 
         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
+            //  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 );
             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();
             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 )
             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();
-#endif
 
             DECL_LINK( OptionsChanged, void* );
             DECL_LINK( SettingsChanged, void* );
             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;
             bool                                                                        m_bHideCurrentUI;
             bool                                                                        m_bGlobalSettings;
             bool                                                                        m_bPreserveContentSize;
-            DockingOperation                                                            m_eDockOperation;
-            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;
             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;
             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::ui::XUIConfigurationListener >       m_xToolbarManager;
     };
     
 } // namespace framework

framework/inc/services/modelwinservice.hxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_
+#define __FRAMEWORK_SERVICES_MODELWINSERVICE_HXX_
+
+//_________________________________________________________________________________________________________________
+//	my own includes
+//_________________________________________________________________________________________________________________
+
+#include <threadhelp/threadhelpbase.hxx>
+#include <macros/generic.hxx>
+#include <macros/debug.hxx>
+#include <macros/xinterface.hxx>
+#include <macros/xtypeprovider.hxx>
+#include <macros/xserviceinfo.hxx>
+#include <general.h>
+#include <stdtypes.h>
+
+//_________________________________________________________________________________________________________________
+//	interface includes
+//_________________________________________________________________________________________________________________
+
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+
+//_________________________________________________________________________________________________________________
+//	other includes
+//_________________________________________________________________________________________________________________
+
+#include <cppuhelper/weak.hxx>
+#include <vcl/window.hxx>
+
+//_________________________________________________________________________________________________________________
+//	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_

framework/inc/uielement/panelwindow.hxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_
+#define __FRAMEWORK_LAYOUTMANAGER_PANELWINDOW_HXX_
+
+//_________________________________________________________________________________________________________________
+//	my own includes
+//_________________________________________________________________________________________________________________
+
+#include <vcl/dockwin.hxx>
+
+//_________________________________________________________________________________________________________________
+//	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_

framework/inc/uielement/panelwrapper.hxx

+
+
+#ifndef __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_
+#define __FRAMEWORK_UIELEMENT_PANELWRAPPER_HXX_
+
+//_________________________________________________________________________________________________________________
+//	my own includes
+//_________________________________________________________________________________________________________________
+
+#include <helper/uielementwrapperbase.hxx>
+
+//_________________________________________________________________________________________________________________
+//	interface includes
+//_________________________________________________________________________________________________________________
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+//_________________________________________________________________________________________________________________
+//	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);
+		
+    //-------------------------------------------------------------------------------------------------------------
+    //	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_

framework/inc/uielement/uielement.hxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_
+#define __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_
+
+//_________________________________________________________________________________________________________________
+//	my own includes
+//_________________________________________________________________________________________________________________
+
+//_________________________________________________________________________________________________________________
+//	interface includes
+//_________________________________________________________________________________________________________________
+
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/ui/DockingArea.hpp>
+
+//_________________________________________________________________________________________________________________
+//	other includes
+//_________________________________________________________________________________________________________________
+
+#include <rtl/ustring.hxx>
+#include <vcl/toolbox.hxx>
+
+//_________________________________________________________________________________________________________________
+//	namespace
+//_________________________________________________________________________________________________________________
+
+namespace framework
+{
+
+struct DockedData
+{
+    DockedData() : m_aPos( LONG_MAX, LONG_MAX ),
+                   m_nDockedArea( ::com::sun::star::ui::DockingArea_DOCKINGAREA_TOP ),
+                   m_bLocked( false ) {}
+
+    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( true ) {}
+
+    Point     m_aPos;
+    Size      m_aSize;
+    sal_Int16 m_nLines;
+    bool      m_bIsHorizontal;
+};
+
+struct UIElement
+{
+    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,
+               bool bFloating = false
+               ) : m_aType( rType ), 
+                   m_aName( rName ),
+                   m_xUIElement( rUIElement ), 
+                   m_bFloating( bFloating ),
+                   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;
+    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;
+
+} // namespace framework
+
+#endif // __FRAMEWORK_LAYOUTMANAGER_UIELEMENT_HXX_

framework/source/layoutmanager/helpers.cxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_framework.hxx"
+
+// my own includes
+#include "helpers.hxx"
+#include <threadhelp/resetableguard.hxx>
+#include <services.h>
+ 
+// interface includes
+#include <com/sun/star/ui/DockingArea.hpp>
+#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <com/sun/star/awt/XDockableWindow.hpp>
+#include <com/sun/star/awt/XDockableWindowListener.hpp>
+#include <com/sun/star/awt/XWindowListener.hpp>
+#include <com/sun/star/ui/XUIElement.hpp>
+
+// other includes
+#include <comphelper/mediadescriptor.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+#include <toolkit/unohlp.hxx>
+
+// namespace
+using namespace com::sun::star;
+
+namespace framework
+{
+
+bool hasEmptySize( const:: Size& aSize )
+{
+    return ( aSize.Width() == 0 ) && ( aSize.Height() == 0 );
+}
+
+bool hasDefaultPosValue( const ::Point& aPos )
+{
+    return (( aPos.X() == SAL_MAX_INT32 ) || ( aPos.Y() == SAL_MAX_INT32 ));
+}
+
+bool isDefaultPos( const ::com::sun::star::awt::Point& aPos )
+{
+    return (( aPos.X == SAL_MAX_INT32 ) && ( aPos.Y == SAL_MAX_INT32 ));
+}
+
+bool isDefaultPos( const ::Point& aPos )
+{
+    return (( aPos.X() == SAL_MAX_INT32 ) && ( aPos.Y() == SAL_MAX_INT32 ));
+}
+
+bool isReverseOrderDockingArea( const sal_Int32 nDockArea )
+{
+    ui::DockingArea eDockArea = static_cast< ui::DockingArea >( nDockArea );
+    return (( eDockArea == ui::DockingArea_DOCKINGAREA_BOTTOM ) || 
+            ( eDockArea == ui::DockingArea_DOCKINGAREA_RIGHT ));
+}
+
+bool isToolboxHorizontalAligned( ToolBox* pToolBox )
+{
+    if ( pToolBox )
+        return (( pToolBox->GetAlign() == WINDOWALIGN_TOP ) || ( pToolBox->GetAlign() == WINDOWALIGN_BOTTOM ));
+    return false;
+}
+
+bool isHorizontalDockingArea( const ui::DockingArea& nDockingArea )
+{
+    return (( nDockingArea == ui::DockingArea_DOCKINGAREA_TOP ) || 
+            ( nDockingArea == ui::DockingArea_DOCKINGAREA_BOTTOM ));
+}
+
+bool isHorizontalDockingArea( const sal_Int32 nDockArea )
+{
+  return isHorizontalDockingArea(static_cast< ui::DockingArea >( nDockArea ));
+}
+
+::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow )
+{
+    ::rtl::OUString aToolbarName;
+    
+    if ( pWindow->GetType() == WINDOW_TOOLBOX )
+    {
+        ToolBox* pToolBox = dynamic_cast<ToolBox *>( pWindow );
+        if ( pToolBox )
+        {
+            aToolbarName = rtl::OStringToOUString( pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8 );
+            sal_Int32 i = aToolbarName.lastIndexOf( ':' );
+            if (( aToolbarName.getLength() > 0 ) && ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() ))
+                aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name
+            else
+              aToolbarName = ::rtl::OUString();
+        }
+    }
+    return aToolbarName;
+}
+
+ToolBox* getToolboxPtr( Window* pWindow )
+{
+    ToolBox* pToolbox(NULL);
+    if ( pWindow->GetType() == WINDOW_TOOLBOX )
+        pToolbox = dynamic_cast<ToolBox*>( pWindow );
+    return pToolbox;
+}
+
+Window* getWindowFromXUIElement( const uno::Reference< ui::XUIElement >& xUIElement )
+{
+    vos::OGuard aGuard( Application::GetSolarMutex() );
+    uno::Reference< awt::XWindow > xWindow;
+    if ( xUIElement.is() )
+        xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY );
+    return VCLUnoHelper::GetWindow( xWindow );
+}
+    
+SystemWindow* getTopSystemWindow( const uno::Reference< awt::XWindow >& xWindow )
+{
+    Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+    while ( pWindow && !pWindow->IsSystemWindow() )
+        pWindow = pWindow->GetParent();
+
+    if ( pWindow )
+        return (SystemWindow *)pWindow;
+    else
+        return 0;
+}
+
+void setZeroRectangle( ::Rectangle& rRect )
+{
+    rRect.setX(0);
+    rRect.setY(0);
+    rRect.setWidth(0);
+    rRect.setHeight(0);
+}
+
+// ATTENTION!
+// This value is directly copied from the sfx2 project.
+// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START)
+static const sal_Int32 DOCKWIN_ID_BASE = 9800;
+
+bool lcl_checkUIElement(const uno::Reference< ui::XUIElement >& xUIElement, awt::Rectangle& _rPosSize, uno::Reference< awt::XWindow >& _xWindow)
+{
+    bool bRet = xUIElement.is();
+    if ( bRet )
+    {
+        vos::OGuard     aGuard( Application::GetSolarMutex() );
+        _xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
+        _rPosSize = _xWindow->getPosSize();
+
+        Window* pWindow = VCLUnoHelper::GetWindow( _xWindow );
+        if ( pWindow->GetType() == WINDOW_TOOLBOX )
+        {
+            ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 );
+            _rPosSize.Width = aSize.Width();
+            _rPosSize.Height = aSize.Height();
+        }
+    } // if ( xUIElement.is() )
+    return bRet;
+}
+
+uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< lang::XMultiServiceFactory >& rFactory, const uno::Reference< awt::XWindowPeer >& rParent, const char* pService )
+{
+    const rtl::OUString aAWTToolkit( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ));
+    
+    uno::Reference< awt::XWindowPeer > xPeer;
+    if ( rFactory.is() )
+    {
+        uno::Reference< awt::XToolkit > xToolkit( rFactory->createInstance( aAWTToolkit ), uno::UNO_QUERY_THROW );
+        if ( xToolkit.is() )
+        {
+            // describe window properties.
+            css::awt::WindowDescriptor aDescriptor;
+            aDescriptor.Type                =   awt::WindowClass_SIMPLE;
+            aDescriptor.WindowServiceName   =   ::rtl::OUString::createFromAscii( pService );  
+            aDescriptor.ParentIndex         =   -1;
+            aDescriptor.Parent              =   uno::Reference< awt::XWindowPeer >( rParent, uno::UNO_QUERY );
+            aDescriptor.Bounds              =   awt::Rectangle(0,0,0,0);
+            aDescriptor.WindowAttributes    =   0;
+
+            // create a awt window
+            xPeer = xToolkit->createWindow( aDescriptor );
+        }
+    }
+
+    return xPeer;
+}
+
+// convert alignment constant to vcl's WindowAlign type
+WindowAlign ImplConvertAlignment( sal_Int16 aAlignment )
+{
+    if ( aAlignment == ui::DockingArea_DOCKINGAREA_LEFT )
+        return WINDOWALIGN_LEFT;
+    else if ( aAlignment == ui::DockingArea_DOCKINGAREA_RIGHT )
+        return WINDOWALIGN_RIGHT;
+    else if ( aAlignment == ui::DockingArea_DOCKINGAREA_TOP )
+        return WINDOWALIGN_TOP;
+    else
+        return WINDOWALIGN_BOTTOM;
+}
+
+::rtl::OUString getElementTypeFromResourceURL( const ::rtl::OUString& aResourceURL )
+{
+    ::rtl::OUString aType;
+
+    ::rtl::OUString aUIResourceURL( UIRESOURCE_URL );
+    if ( aResourceURL.indexOf( aUIResourceURL ) == 0 )
+    {
+        sal_Int32       nIndex = 0;
+        ::rtl::OUString aPathPart   = aResourceURL.copy( aUIResourceURL.getLength() );
+        ::rtl::OUString aUIResource = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
+
+        return aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
+    }
+
+    return aType;
+}
+
+void parseResourceURL( const rtl::OUString& aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName )
+{
+    ::rtl::OUString aUIResourceURL( UIRESOURCE_URL );
+    if ( aResourceURL.indexOf( aUIResourceURL ) == 0 )
+    {
+        sal_Int32       nIndex = 0;
+        ::rtl::OUString aPathPart   = aResourceURL.copy( aUIResourceURL.getLength() );
+        ::rtl::OUString aUIResource = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
+
+        aElementType = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
+        aElementName = aPathPart.getToken( 0, (sal_Unicode)'/', nIndex );
+    }
+}
+
+::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect )
+{
+    css::awt::Rectangle aRect;
+    aRect.X = rRect.Left();
+    aRect.Y = rRect.Top();
+    aRect.Width = rRect.Right();
+    aRect.Height = rRect.Bottom();
+
+    return aRect;
+}
+
+::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect )
+{
+    ::Rectangle aRect;
+    aRect.Left() = rRect.X;
+    aRect.Top() = rRect.Y;
+    aRect.Right() = rRect.Width;
+    aRect.Bottom() = rRect.Height;
+
+    return aRect;
+}
+
+css::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect )
+{
+    css::awt::Rectangle aRect;
+    aRect.X = rRect.Left();
+    aRect.Y = rRect.Top();
+    aRect.Width = rRect.GetWidth();
+    aRect.Height = rRect.GetHeight();
+    return aRect;
+}
+
+::Rectangle convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect )
+{
+    ::Rectangle aRect;
+    aRect.Left()   = rRect.X;
+    aRect.Top()    = rRect.Y;
+    aRect.Right()  = rRect.X + rRect.Width;
+    aRect.Bottom() = rRect.Y + rRect.Height;
+
+    return aRect;
+}
+
+bool equalRectangles( const css::awt::Rectangle& rRect1,
+                      const css::awt::Rectangle& rRect2 )
+{
+    return (( rRect1.X == rRect2.X ) &&
+            ( rRect1.Y == rRect2.Y ) &&
+            ( rRect1.Width == rRect2.Width ) &&
+            ( rRect1.Height == rRect2.Height ));
+}
+
+uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< frame::XFrame >& rFrame )
+{
+    // Query for the model to get check the context information
+    uno::Reference< frame::XModel > xModel;
+        if ( rFrame.is() )
+        {
+        uno::Reference< frame::XController > xController( rFrame->getController(), uno::UNO_QUERY );
+            if ( xController.is() )
+                xModel = xController->getModel();
+        }
+
+    return xModel;
+}
+
+sal_Bool implts_isPreviewModel( const uno::Reference< frame::XModel >& xModel )
+{
+    if ( xModel.is() )
+    {
+        ::comphelper::MediaDescriptor aDesc( xModel->getArgs() );
+        return aDesc.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW(), (sal_Bool)sal_False);
+    }
+    else
+        return sal_False;
+}
+
+sal_Bool implts_isFrameOrWindowTop( const uno::Reference< frame::XFrame >& xFrame )
+{
+    if (xFrame->isTop())
+        return sal_True;
+
+    uno::Reference< awt::XTopWindow > xWindowCheck(xFrame->getContainerWindow(), uno::UNO_QUERY); // dont use _THROW here ... its a check only
+    if (xWindowCheck.is())
+    {
+        // --> PB 2007-06-18 #i76867# top and system window is required.
+        ::vos::OGuard aSolarLock(&Application::GetSolarMutex());
+        uno::Reference< awt::XWindow > xWindow( xWindowCheck, uno::UNO_QUERY );
+        Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
+        return ( pWindow && pWindow->IsSystemWindow() );
+        // <--
+    }
+
+    return sal_False;
+}
+
+void impl_setDockingWindowVisibility( const css::uno::Reference< css::lang::XMultiServiceFactory>& rSMGR, const css::uno::Reference< css::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible )
+{
+    const ::rtl::OUString aDockWinPrefixCommand( RTL_CONSTASCII_USTRINGPARAM( "DockingWindow" ));
+    css::uno::WeakReference< css::frame::XDispatchHelper > xDispatchHelper;
+    
+    sal_Int32 nID    = rDockingWindowName.toInt32();
+    sal_Int32 nIndex = nID - DOCKWIN_ID_BASE;
+
+    css::uno::Reference< css::frame::XDispatchProvider > xProvider(rFrame, css::uno::UNO_QUERY);
+    if ( nIndex >= 0 && xProvider.is() )
+    {
+        ::rtl::OUString aDockWinCommand( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
+        ::rtl::OUString aDockWinArgName( aDockWinPrefixCommand );
+        
+        aDockWinArgName += ::rtl::OUString::valueOf( nIndex );
+        
+        css::uno::Sequence< css::beans::PropertyValue > aArgs(1);
+        aArgs[0].Name  = aDockWinArgName;
+        aArgs[0].Value = css::uno::makeAny( bVisible );
+
+        css::uno::Reference< css::frame::XDispatchHelper > xDispatcher( xDispatchHelper );
+        if ( !xDispatcher.is())
+        {
+            xDispatcher = css::uno::Reference< css::frame::XDispatchHelper >(
+                rSMGR->createInstance(SERVICENAME_DISPATCHHELPER), css::uno::UNO_QUERY_THROW);
+        }
+
+        aDockWinCommand = aDockWinCommand + aDockWinArgName;
+        xDispatcher->executeDispatch(
+            xProvider,
+            aDockWinCommand,
+            ::rtl::OUString::createFromAscii("_self"),
+            0,
+            aArgs);
+    }
+}
+
+void impl_addWindowListeners( 
+    const css::uno::Reference< css::uno::XInterface >& xThis, 
+    const css::uno::Reference< css::ui::XUIElement >& xUIElement )
+{
+    css::uno::Reference< css::awt::XWindow > xWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY );
+    css::uno::Reference< css::awt::XDockableWindow > xDockWindow( xUIElement->getRealInterface(), css::uno::UNO_QUERY );
+    if ( xDockWindow.is() && xWindow.is() )
+    {
+        try
+        {
+            xDockWindow->addDockableWindowListener( 
+                css::uno::Reference< css::awt::XDockableWindowListener >(
+                    xThis, css::uno::UNO_QUERY ));
+            xWindow->addWindowListener( 
+                css::uno::Reference< css::awt::XWindowListener >(
+                    xThis, css::uno::UNO_QUERY ));
+            xDockWindow->enableDocking( sal_True );
+        }
+        catch ( css::uno::Exception& )
+        {
+        }
+    }
+}
+
+} // namespace framework

framework/source/layoutmanager/helpers.hxx

+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_
+#define __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_
+
+// my own includes
+#include <macros/generic.hxx>
+#include <stdtypes.h>
+#include <properties.h>
+
+// interface includes
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/ui/DockingArea.hpp>
+#include <com/sun/star/awt/Point.hpp>
+
+// other includes
+#include <vcl/window.hxx>
+#include <vcl/toolbox.hxx>
+
+#define UIRESOURCE_PROTOCO_ASCII        "private:"
+#define UIRESOURCE_RESOURCE_ASCII       "resource"
+#define UIRESOURCE_URL_ASCII            "private:resource"
+#define UIRESOURCE_URL                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( UIRESOURCE_URL_ASCII ))
+#define UIRESOURCETYPE_TOOLBAR          "toolbar"
+#define UIRESOURCETYPE_STATUSBAR        "statusbar"
+#define UIRESOURCETYPE_MENUBAR          "menubar"
+
+namespace framework
+{
+
+bool hasEmptySize( const:: Size& aSize );
+bool hasDefaultPosValue( const ::Point& aPos );
+bool isDefaultPos( const ::com::sun::star::awt::Point& aPos );
+bool isDefaultPos( const ::Point& aPos );
+bool isToolboxHorizontalAligned( ToolBox* pToolBox );
+bool isReverseOrderDockingArea( const sal_Int32 nDockArea );
+bool isHorizontalDockingArea( const sal_Int32 nDockArea );
+bool isHorizontalDockingArea( const ::com::sun::star::ui::DockingArea& nDockArea );
+::rtl::OUString retrieveToolbarNameFromHelpURL( Window* pWindow );
+ToolBox* getToolboxPtr( Window* pWindow );
+Window* getWindowFromXUIElement( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement );
+SystemWindow* getTopSystemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& xWindow );
+bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 );
+void setZeroRectangle( ::Rectangle& rRect );
+bool lcl_checkUIElement(const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >& xUIElement,::com::sun::star::awt::Rectangle& _rPosSize, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xWindow);
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rFactory, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent, const char* pService );
+WindowAlign ImplConvertAlignment( sal_Int16 aAlignment );
+::rtl::OUString getElementTypeFromResourceURL( const ::rtl::OUString& aResourceURL );
+void parseResourceURL( const rtl::OUString& aResourceURL, rtl::OUString& aElementType, rtl::OUString& aElementName );
+::Rectangle putAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect );
+::com::sun::star::awt::Rectangle putRectangleValueToAWT( const ::Rectangle& rRect );
+::com::sun::star::awt::Rectangle convertRectangleToAWT( const ::Rectangle& rRect );
+::Rectangle convertAWTToRectangle( const ::com::sun::star::awt::Rectangle& rRect );
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > impl_getModelFromFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+sal_Bool implts_isPreviewModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
+sal_Bool implts_isFrameOrWindowTop( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame );
+void impl_setDockingWindowVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& rSMGR, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rDockingWindowName, bool bVisible );
+void impl_addWindowListeners( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xThis, const ::com::sun::star::uno::Reference< css::ui::XUIElement >& xUIElement );
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const css::uno::Reference< ::com::sun::star::awt::XToolkit >& rToolkit, const css::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rParent );
+
+}
+
+#endif // __FRAMEWORK_LAYOUTMANAGER_HELPERS_HXX_
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.