--- officecfg/registry/schema/org/openoffice/Office/Common.xcs	2005-06-27 16:27:27.000000000 +0530
+++ officecfg/registry/schema/org/openoffice/Office/Common.xcs	2005-07-11 18:53:02.204896274 +0530
@@ -4902,6 +4902,13 @@ Dymamic border coloring means that when 
 				</info>
 				<value>true</value>
 			</prop>
+			<prop oor:name="DisableUICustomization" oor:type="xs:boolean">
+				<info>
+					<author>RSiddhartha</author>
+					<desc>Disables the customization of the UI elements.</desc>
+				</info>
+				<value>false</value>
+			</prop>
 			<prop oor:name="SymbolSet" oor:type="xs:short">
 				<!-- UIHints: Tools  Options General View -->
 				<info>
--- svtools/inc/miscopt.hxx	2005-06-27 16:27:26.000000000 +0530
+++ svtools/inc/miscopt.hxx	2005-07-11 17:58:51.734343074 +0530
@@ -157,6 +157,8 @@ class SVL_DLLPUBLIC SvtMiscOptions
         sal_Bool UseSystemFileDialog() const;
         void SetUseSystemFileDialog( sal_Bool bSet );
 
+        sal_Bool DisableUICustomization() const;
+
         sal_Bool IsPluginsEnabled() const;
 		void SetPluginsEnabled( sal_Bool bEnable );
 
--- svtools/source/config/miscopt.cxx	2005-06-27 16:27:27.000000000 +0530
+++ svtools/source/config/miscopt.cxx	2005-07-11 18:43:48.450164303 +0530
@@ -109,8 +109,10 @@ using namespace ::com::sun::star;
 #define PROPERTYHANDLE_USESYSTEMFILEDIALOG	3
 #define PROPERTYNAME_SYMBOLSTYLE			ASCII_STR("SymbolStyle")
 #define PROPERTYHANDLE_SYMBOLSTYLE			4
+#define PROPERTYNAME_DISABLEUICUSTOMIZATION	ASCII_STR("DisableUICustomization")
+#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION			5
 
-#define PROPERTYCOUNT						5
+#define PROPERTYCOUNT						6
 
 #define VCL_TOOLBOX_STYLE_FLAT				((USHORT)0x0004) // from <vcl/toolbox.hxx>
 
@@ -136,6 +138,7 @@ class SvtMiscOptions_Impl : public Confi
     sal_Bool    m_bIsSymbolSetRO;
     sal_Int16   m_nToolboxStyle;
     sal_Bool    m_bIsToolboxStyleRO;
+    sal_Bool    m_bDisableUICustomization;
 
     //-------------------------------------------------------------------------------------------------------------
 	//	public methods
@@ -204,6 +207,9 @@ class SvtMiscOptions_Impl : public Confi
         inline sal_Bool IsUseSystemFileDialogReadOnly() const
         { return m_bIsUseSystemFileDialogRO; }
 
+        inline sal_Bool DisableUICustomization() const
+        { return m_bDisableUICustomization; }
+
         inline sal_Bool IsPluginsEnabled() const
         { return m_bPluginsEnabled; }
 
@@ -369,6 +375,13 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl
                 m_bIsUseSystemFileDialogRO = seqRO[nProperty];
                 break;
             }
+	    
+            case PROPERTYHANDLE_DISABLEUICUSTOMIZATION : 
+            {
+                if( !(seqValues[nProperty] >>= m_bDisableUICustomization) )
+                    DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
+                    break;
+            }
         }
 	}
 
@@ -453,6 +466,11 @@ void SvtMiscOptions_Impl::Load( const Se
                                                                 DBG_ERROR("Wrong type of \"Misc\\SymbolSet\"!" );
                                                         }
                                                     break;
+            case PROPERTYHANDLE_DISABLEUICUSTOMIZATION      :   {
+                                                            if( !(seqValues[nProperty] >>= m_bDisableUICustomization) )
+                                                                DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
+                                                        }
+                                                    break;
         }
     }
 }
@@ -633,6 +633,12 @@ void SvtMiscOptions_Impl::Commit()
 					seqValues[nProperty] <<= GetSymbolsStyleName();
 				break;
 			}
+
+            case PROPERTYHANDLE_DISABLEUICUSTOMIZATION :
+            {
+                seqValues[nProperty] <<= m_bDisableUICustomization;
+                break;
+            }
         }
 	}
 	// Set properties in configuration.
@@ -651,7 +651,8 @@ Sequence< OUString > SvtMiscOptions_Impl
         PROPERTYNAME_SYMBOLSET,
         PROPERTYNAME_TOOLBOXSTYLE,
         PROPERTYNAME_USESYSTEMFILEDIALOG,
-        PROPERTYNAME_SYMBOLSTYLE
+        PROPERTYNAME_SYMBOLSTYLE,
+        PROPERTYNAME_DISABLEUICUSTOMIZATION
 	};
 
 	// Initialize return sequence with these list ...
@@ -743,6 +766,11 @@ sal_Bool SvtMiscOptions::IsGetSymbolSetR
     return m_pDataContainer->IsGetSymbolSetReadOnly();
 }
 
+sal_Bool SvtMiscOptions::DisableUICustomization() const
+{
+    return m_pDataContainer->DisableUICustomization();
+}
+
 sal_Int16 SvtMiscOptions::GetToolboxStyle() const
 {
     return m_pDataContainer->GetToolboxStyle();
--- sfx2/sdi/appslots.sdi	2005-02-16 23:50:35.000000000 +0530
+++ sfx2/sdi/appslots.sdi	2005-07-07 12:41:15.000000000 +0530
@@ -330,6 +330,7 @@ interface Application : Module
 	SID_AVAILABLE_TOOLBARS
 	[
 		ExecMethod = MiscExec_Impl ;
+		StateMethod = MiscState_Impl ;
 	]
 
 	//---------------------------------------------------------------------
--- sfx2/source/appl/appserv.cxx	2005-06-27 16:27:22.000000000 +0530
+++ sfx2/source/appl/appserv.cxx	2005-07-11 18:29:05.699333198 +0530
@@ -186,6 +186,9 @@
 #include <svtools/moduleoptions.hxx>
 #include <svtools/regoptions.hxx>
 #include <svtools/helpopt.hxx>
+#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
+#include <svtools/miscopt.hxx>
+#endif // INCLUDED_SVTOOLS_MISCOPT_HXX
 #include <tools/shl.hxx>
 
 #include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
@@ -728,6 +731,18 @@ void SfxApplication::MiscState_Impl(SfxI
 					break;
 				}
 
+				case SID_CONFIG:
+				case SID_TOOLBOXOPTIONS:
+				case SID_CONFIGSTATUSBAR:
+				case SID_CONFIGMENU:
+				case SID_CONFIGACCEL:
+				case SID_CONFIGEVENT:
+				{
+					if( SvtMiscOptions().DisableUICustomization() )
+						rSet.DisableItem(nWhich);
+					break;
+				}
+
 				case SID_BASICSTOP:
 					if ( !StarBASIC::IsRunning() )
 						rSet.DisableItem(nWhich);
--- framework/source/uielement/toolbarmanager.cxx	2005-06-27 16:27:26.000000000 +0530
+++ framework/source/uielement/toolbarmanager.cxx	2005-07-11 18:27:01.959582798 +0530
@@ -324,7 +324,7 @@ ToolBarManager::ToolBarManager( const Re
     m_bUpdateControllers( sal_False ),
     m_bImageOrientationRegistered( sal_False ),
     m_bImageMirrored( sal_False ),
-    m_bCanBeCustomized( sal_True ),
+    m_bCanBeCustomized( !SvtMiscOptions().DisableUICustomization() ),
     m_lImageRotation( 0 ),
     m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() )
 {
@@ -516,6 +516,24 @@ void ToolBarManager::UpdateControllers()
 {
     RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" );
 
+    if( !m_bCanBeCustomized )
+    {
+        Any a;
+        Reference< XLayoutManager > xLayoutManager;
+        Reference< XPropertySet > xFramePropSet( m_xFrame, UNO_QUERY );
+        if ( xFramePropSet.is() )
+            a = xFramePropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
+        a >>= xLayoutManager;
+        Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY );
+        if ( xLayoutManager.is() && xDockable.is() )
+        {
+            ::com::sun::star::awt::Point aPoint;
+            aPoint.X = aPoint.Y = LONG_MAX;
+            xLayoutManager->dockWindow( m_aResourceName, DockingArea_DOCKINGAREA_DEFAULT, aPoint );
+            xLayoutManager->lockWindow( m_aResourceName );
+        }
+    }
+
     if ( !m_bUpdateControllers )
     {
         m_bUpdateControllers = sal_True;
@@ -1641,6 +1659,7 @@ IMPL_LINK( ToolBarManager, MenuButton, T
             // Non-configurable toolbars should disable configuration menu items
             aPopupMenu.EnableItem( MENUITEM_TOOLBAR_VISIBLEBUTTON, sal_False );
             aPopupMenu.EnableItem( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, sal_False );
+            aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, sal_False );
         }
 
 		pItemMenu->SetMenuFlags (pItemMenu->GetMenuFlags () | 
--- framework/source/uielement/toolbarsmenucontroller.cxx	2005-03-29 20:30:44.000000000 +0530
+++ framework/source/uielement/toolbarsmenucontroller.cxx	2005-07-11 18:09:16.732966419 +0530
@@ -155,6 +155,9 @@
 #ifndef INCLUDED_SVTOOLS_MENUOPTIONS_HXX
 #include <svtools/menuoptions.hxx>
 #endif
+#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX
+#include <svtools/miscopt.hxx>
+#endif // INCLUDED_SVTOOLS_MISCOPT_HXX
 #include <svtools/cmdoptions.hxx>
 
 //_________________________________________________________________________________________________________________
@@ -417,6 +420,9 @@ Sequence< Sequence< com::sun::star::bean
 
 void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu )
 {
+    if( SvtMiscOptions().DisableUICustomization() )
+        return;
+
     vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
     resetPopupMenu( rPopupMenu );
 
