You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2012/01/12 17:15:09 UTC

svn commit: r1230614 - in /incubator/ooo/trunk/main/desktop/source/deployment: dp_persmap.cxx inc/dp_persmap.h

Author: hdu
Date: Thu Jan 12 16:15:09 2012
New Revision: 1230614

URL: http://svn.apache.org/viewvc?rev=1230614&view=rev
Log:
i118726 do not flush *pmap file while reading it

Modified:
    incubator/ooo/trunk/main/desktop/source/deployment/dp_persmap.cxx
    incubator/ooo/trunk/main/desktop/source/deployment/inc/dp_persmap.h

Modified: incubator/ooo/trunk/main/desktop/source/deployment/dp_persmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/deployment/dp_persmap.cxx?rev=1230614&r1=1230613&r2=1230614&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/deployment/dp_persmap.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/deployment/dp_persmap.cxx Thu Jan 12 16:15:09 2012
@@ -205,7 +205,7 @@ bool PersistentMap::readAll()
 		const OString aKeyName = decodeString( (sal_Char*)aKeyLine.getConstArray(), aKeyLine.getLength());
 		const OString aValName = decodeString( (sal_Char*)aValLine.getConstArray(), aValLine.getLength());
 		// insert key-value pair into map
-		put( aKeyName, aValName);
+		add( aKeyName, aValName);
 		// check end-of-file status
 		sal_Bool bIsEOF = true;
 		if( m_MapFile.isEndOfFile( &bIsEOF) != osl::File::E_None)
@@ -286,13 +286,19 @@ bool PersistentMap::get( OString * value
 }
 
 //______________________________________________________________________________
-void PersistentMap::put( OString const & key, OString const & value )
+void PersistentMap::add( OString const & key, OString const & value )
 {
 	if( m_bReadOnly)
 		return;
 	typedef std::pair<t_string2string_map::iterator,bool> InsertRC;
 	InsertRC r = m_entries.insert( t_string2string_map::value_type(key,value));
 	m_bIsDirty = r.second;
+}
+
+//______________________________________________________________________________
+void PersistentMap::put( OString const & key, OString const & value )
+{
+	add( key, value);
 	// HACK: flush now as the extension manager does not seem
 	//       to properly destruct this object in some situations
 	if( m_bIsDirty)

Modified: incubator/ooo/trunk/main/desktop/source/deployment/inc/dp_persmap.h
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/deployment/inc/dp_persmap.h?rev=1230614&r1=1230613&r2=1230614&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/deployment/inc/dp_persmap.h (original)
+++ incubator/ooo/trunk/main/desktop/source/deployment/inc/dp_persmap.h Thu Jan 12 16:15:09 2012
@@ -57,6 +57,7 @@ public:
 protected:
 	bool open( void);
 	bool readAll( void);
+	void add( ::rtl::OString const & key, ::rtl::OString const & value );
 	void flush( void);
 };