From da06166015689eca260c702602bef4cea58afbd3 Mon Sep 17 00:00:00 2001 From: Alex Ivan Date: Mon, 15 Apr 2013 18:56:10 +0300 Subject: fix bug #60700 - de-crutify ODF files Initialization of storage elements in Configuration folder is now done in read-only mode. Modification does not affect these folders in case of actual storage within them. Only tested for example posted on bugzilla page. Added open mode directly into function call. Change-Id: Ib2b4ae1f4cab35f2c9cd1fc7081302e1231da7a4 Reviewed-on: https://gerrit.libreoffice.org/3401 Reviewed-by: Chris Sherlock Reviewed-by: Michael Meeks Tested-by: Michael Meeks --- framework/source/uiconfiguration/uiconfigurationmanager.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index a2469e087cea..c32e2d90c452 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -540,8 +540,6 @@ void UIConfigurationManager::impl_Initialize() // Initialize the top-level structures with the storage data if ( m_xDocConfigStorage.is() ) { - long nModes = m_bReadOnly ? ElementModes::READ : ElementModes::READWRITE; - // Try to access our module sub folder for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) @@ -549,7 +547,7 @@ void UIConfigurationManager::impl_Initialize() Reference< XStorage > xElementTypeStorage; try { - xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), nModes ); + xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READ ); } catch ( const com::sun::star::container::NoSuchElementException& ) { -- cgit