1 --- officecfg/registry/schema/org/openoffice/Office/Common.xcs.old 2009-04-06 16:42:16.000000000 +0000
2 +++ officecfg/registry/schema/org/openoffice/Office/Common.xcs 2009-04-06 16:42:19.000000000 +0000
3 @@ -5653,6 +5653,13 @@ Dymamic border coloring means that when
7 + <prop oor:name="DisableUICustomization" oor:type="xs:boolean">
9 + <author>RSiddhartha</author>
10 + <desc>Disables the customization of the UI elements.</desc>
12 + <value>false</value>
14 <prop oor:name="SymbolSet" oor:type="xs:short">
15 <!-- UIHints: Tools Options General View -->
17 --- svtools/inc/svtools/miscopt.hxx.old 2009-04-06 16:42:16.000000000 +0000
18 +++ svtools/inc/svtools/miscopt.hxx 2009-04-06 16:42:19.000000000 +0000
19 @@ -117,6 +117,8 @@ class SVT_DLLPUBLIC SvtMiscOptions: publ
20 void SetTryODMADialog( sal_Bool bSet );
21 sal_Bool IsTryUseODMADialogReadOnly() const;
23 + sal_Bool DisableUICustomization() const;
25 sal_Bool IsPluginsEnabled() const;
26 void SetPluginsEnabled( sal_Bool bEnable );
27 sal_Bool IsPluginsEnabledReadOnly() const;
28 --- svtools/source/config/miscopt.cxx.old 2009-04-06 16:42:16.000000000 +0000
29 +++ svtools/source/config/miscopt.cxx 2009-04-06 16:42:19.000000000 +0000
30 @@ -89,8 +89,10 @@ using namespace ::com::sun::star;
31 #define PROPERTYHANDLE_TRYODMADIALOG 6
32 #define PROPERTYNAME_SHOWLINKWARNINGDIALOG ASCII_STR("ShowLinkWarningDialog")
33 #define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 7
34 +#define PROPERTYNAME_DISABLEUICUSTOMIZATION ASCII_STR("DisableUICustomization")
35 +#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 8
37 -#define PROPERTYCOUNT 8
38 +#define PROPERTYCOUNT 9
40 #define VCL_TOOLBOX_STYLE_FLAT ((USHORT)0x0004) // from <vcl/toolbox.hxx>
42 @@ -123,6 +125,7 @@ class SvtMiscOptions_Impl : public Confi
43 sal_Bool m_bIsUseSystemPrintDialogRO;
44 sal_Bool m_bShowLinkWarningDialog;
45 sal_Bool m_bIsShowLinkWarningDialogRO;
46 + sal_Bool m_bDisableUICustomization;
48 //-------------------------------------------------------------------------------------------------------------
50 @@ -200,6 +203,9 @@ class SvtMiscOptions_Impl : public Confi
51 inline sal_Bool IsTryUseODMADialogReadOnly() const
52 { return m_bIsTryODMADialogRO; }
54 + inline sal_Bool DisableUICustomization() const
55 + { return m_bDisableUICustomization; }
57 inline sal_Bool IsPluginsEnabled() const
58 { return m_bPluginsEnabled; }
60 @@ -448,6 +454,13 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl
61 m_bIsSymbolsStyleRO = seqRO[nProperty];
65 + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION :
67 + if( !(seqValues[nProperty] >>= m_bDisableUICustomization) )
68 + DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
74 @@ -563,6 +576,11 @@ void SvtMiscOptions_Impl::Load( const Se
78 + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION : {
79 + if( !(seqValues[nProperty] >>= m_bDisableUICustomization) )
80 + DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" );
86 @@ -726,6 +744,12 @@ void SvtMiscOptions_Impl::Commit()
87 seqValues[nProperty] <<= m_bShowLinkWarningDialog;
91 + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION :
93 + seqValues[nProperty] <<= m_bDisableUICustomization;
98 // Set properties in configuration.
99 @@ -747,7 +771,8 @@ Sequence< OUString > SvtMiscOptions_Impl
100 PROPERTYNAME_SYMBOLSTYLE,
101 PROPERTYNAME_USESYSTEMPRINTDIALOG,
102 PROPERTYNAME_TRYODMADIALOG,
103 - PROPERTYNAME_SHOWLINKWARNINGDIALOG
104 + PROPERTYNAME_SHOWLINKWARNINGDIALOG,
105 + PROPERTYNAME_DISABLEUICUSTOMIZATION
108 // Initialize return sequence with these list ...
109 @@ -908,6 +933,11 @@ sal_Bool SvtMiscOptions::IsGetSymbolsSty
110 return m_pDataContainer->IsGetSymbolsStyleReadOnly();
113 +sal_Bool SvtMiscOptions::DisableUICustomization() const
115 + return m_pDataContainer->DisableUICustomization();
118 sal_Int16 SvtMiscOptions::GetToolboxStyle() const
120 return m_pDataContainer->GetToolboxStyle();
121 --- sfx2/sdi/appslots.sdi.old 2009-04-02 10:43:51.000000000 +0000
122 +++ sfx2/sdi/appslots.sdi 2009-04-06 16:42:19.000000000 +0000
123 @@ -188,6 +188,7 @@ interface Application
124 SID_AVAILABLE_TOOLBARS
126 ExecMethod = MiscExec_Impl ;
127 + StateMethod = MiscState_Impl ;
131 --- sfx2/source/appl/appserv.cxx.old 2009-04-06 16:41:54.000000000 +0000
132 +++ sfx2/source/appl/appserv.cxx 2009-04-06 16:42:19.000000000 +0000
134 #include <svtools/moduleoptions.hxx>
135 #include <svtools/regoptions.hxx>
136 #include <svtools/helpopt.hxx>
137 +#include <svtools/miscopt.hxx>
138 #include <toolkit/helper/vclunohelper.hxx>
139 #include <tools/shl.hxx>
140 #include <unotools/bootstrap.hxx>
141 @@ -680,6 +681,18 @@ void SfxApplication::MiscState_Impl(SfxI
146 + case SID_TOOLBOXOPTIONS:
147 + case SID_CONFIGSTATUSBAR:
148 + case SID_CONFIGMENU:
149 + case SID_CONFIGACCEL:
150 + case SID_CONFIGEVENT:
152 + if( SvtMiscOptions().DisableUICustomization() )
153 + rSet.DisableItem(nWhich);
158 if ( !StarBASIC::IsRunning() )
159 rSet.DisableItem(nWhich);
160 --- framework/source/uielement/toolbarmanager.cxx.old 2009-04-02 10:56:25.000000000 +0000
161 +++ framework/source/uielement/toolbarmanager.cxx 2009-04-06 16:42:19.000000000 +0000
162 @@ -252,7 +252,7 @@ ToolBarManager::ToolBarManager( const Re
163 m_bUpdateControllers( sal_False ),
164 m_bImageOrientationRegistered( sal_False ),
165 m_bImageMirrored( sal_False ),
166 - m_bCanBeCustomized( sal_True ),
167 + m_bCanBeCustomized( !SvtMiscOptions().DisableUICustomization() ),
168 m_lImageRotation( 0 ),
169 m_pToolBar( pToolBar ),
170 m_aResourceName( rResourceName ),
171 @@ -473,6 +473,24 @@ void ToolBarManager::UpdateControllers()
173 RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" );
175 + if( !m_bCanBeCustomized )
178 + Reference< XLayoutManager > xLayoutManager;
179 + Reference< XPropertySet > xFramePropSet( m_xFrame, UNO_QUERY );
180 + if ( xFramePropSet.is() )
181 + a = xFramePropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )));
182 + a >>= xLayoutManager;
183 + Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY );
184 + if ( xLayoutManager.is() && xDockable.is() )
186 + ::com::sun::star::awt::Point aPoint;
187 + aPoint.X = aPoint.Y = LONG_MAX;
188 + xLayoutManager->dockWindow( m_aResourceName, DockingArea_DOCKINGAREA_DEFAULT, aPoint );
189 + xLayoutManager->lockWindow( m_aResourceName );
193 if ( !m_bUpdateControllers )
195 m_bUpdateControllers = sal_True;
196 @@ -1701,6 +1719,7 @@ PopupMenu * ToolBarManager::GetToolBarCu
197 // Non-configurable toolbars should disable configuration menu items
198 aPopupMenu.EnableItem( MENUITEM_TOOLBAR_VISIBLEBUTTON, sal_False );
199 aPopupMenu.EnableItem( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, sal_False );
200 + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, sal_False );
203 // Disable menu item CLOSE if the toolbar has no closer
204 --- framework/source/uielement/toolbarsmenucontroller.cxx.old 2009-04-02 10:56:25.000000000 +0000
205 +++ framework/source/uielement/toolbarsmenucontroller.cxx 2009-04-06 16:42:19.000000000 +0000
207 #include <svtools/menuoptions.hxx>
208 #include <svtools/cmdoptions.hxx>
209 #include <dispatch/uieventloghelper.hxx>
210 #include <rtl/logfile.hxx>
211 +#include <svtools/miscopt.hxx>
213 //_________________________________________________________________________________________________________________
215 @@ -384,6 +385,9 @@ sal_Bool ToolbarsMenuController::isConte
217 void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopupMenu )
219 + if( SvtMiscOptions().DisableUICustomization() )
222 vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
223 resetPopupMenu( rPopupMenu );