rpms/openoffice.org/F-13 openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch, 1.1, 1.2 openoffice.org.spec, 1.2203, 1.2204

Caolan McNamara caolanm at fedoraproject.org
Fri Jun 25 19:09:11 UTC 2010


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2412/F-13

Modified Files:
	openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch 
	openoffice.org.spec 
Log Message:
Resolves: rhbz#608114 cppu-licecycle issues

openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch:
 cppu/source/threadpool/jobqueue.cxx            |    3 -
 cppu/source/threadpool/jobqueue.hxx            |    6 ++
 cppu/source/threadpool/thread.cxx              |   32 ++++++------
 cppu/source/threadpool/thread.hxx              |    5 +
 cppu/source/threadpool/threadpool.cxx          |   58 +++++++++++----------
 cppu/source/threadpool/threadpool.hxx          |   15 ++++-
 cppu/source/uno/lbenv.cxx                      |   11 +++-
 cppu/util/target.pmk                           |    9 ---
 package/inc/ZipPackageFolder.hxx               |    7 --
 package/source/xstor/owriteablestream.cxx      |   20 +------
 package/source/xstor/xstorage.cxx              |   20 +------
 package/source/zippackage/ZipPackage.cxx       |   16 +-----
 package/source/zippackage/ZipPackageFolder.cxx |   15 +++--
 package/source/zippackage/ZipPackageStream.cxx |   15 +++--
 package/source/zippackage/ZipPackageStream.hxx |    6 --
 sax/source/tools/fastserializer.cxx            |   66 ++++++++++++-------------
 16 files changed, 154 insertions(+), 150 deletions(-)

Index: openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-13/openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch	18 Jun 2010 15:08:58 -0000	1.1
+++ openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch	25 Jun 2010 19:09:10 -0000	1.2
@@ -1,6 +1,5 @@
-diff -ru OOO320_m6/cppu/source/threadpool/jobqueue.cxx OOO320_m6/cppu/source/threadpool/jobqueue.cxx
---- OOO320_m6/cppu/source/threadpool/jobqueue.cxx	2008-04-11 11:33:02.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/jobqueue.cxx	2009-12-02 16:14:26.000000000 +0000
+--- cppu/source/threadpool/jobqueue.cxx	2008-04-11 11:33:02.000000000 +0100
++++ cppu/source/threadpool/jobqueue.cxx	2009-12-02 16:14:26.000000000 +0000
 @@ -45,6 +45,7 @@
  		m_cndWait( osl_createCondition() )
  	{
@@ -18,9 +17,8 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  			{
  				return 0;
  			}
-diff -ru OOO320_m6/cppu/source/threadpool/jobqueue.hxx OOO320_m6/cppu/source/threadpool/jobqueue.hxx
---- OOO320_m6/cppu/source/threadpool/jobqueue.hxx	2008-04-11 11:33:18.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/jobqueue.hxx	2009-12-02 16:15:49.000000000 +0000
+--- cppu/source/threadpool/jobqueue.hxx	2008-04-11 11:33:18.000000000 +0100
++++ cppu/source/threadpool/jobqueue.hxx	2009-12-02 16:15:49.000000000 +0000
 @@ -37,6 +37,8 @@
  #include <osl/conditn.h>
  #include <osl/mutex.hxx>
@@ -48,10 +46,9 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	};
  }
  
-diff -ru OOO320_m6/cppu/source/threadpool/thread.cxx OOO320_m6/cppu/source/threadpool/thread.cxx
---- OOO320_m6/cppu/source/threadpool/thread.cxx	2008-04-11 11:34:00.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/thread.cxx	2009-12-03 16:15:02.000000000 +0000
-@@ -34,6 +34,8 @@
+--- cppu/source/threadpool/thread.cxx	2008-04-11 11:34:00.000000000 +0100
++++ cppu/source/threadpool/thread.cxx	2009-12-03 16:15:02.000000000 +0000
+@@ -31,6 +31,8 @@
  #include <osl/diagnose.h>
  #include <uno/threadpool.h>
  
@@ -60,12 +57,13 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  #include "thread.hxx"
  #include "jobqueue.hxx"
  #include "threadpool.hxx"
-@@ -101,20 +103,11 @@
+@@ -98,20 +100,17 @@
  		} while( pCurrent );
  	}
  
 -	ThreadAdmin* ThreadAdmin::getInstance()
--	{
++	struct theThreadAdmin : public rtl::StaticWithInit< ThreadAdminHolder, theThreadAdmin >
+ 	{
 -		static ThreadAdmin *pThreadAdmin = 0;
 -		if( ! pThreadAdmin )
 -		{
@@ -75,35 +73,44 @@ diff -ru OOO320_m6/cppu/source/threadpoo
 -				static ThreadAdmin admin;
 -				pThreadAdmin = &admin;
 -			}
--		}
++		ThreadAdminHolder operator () () {
++			ThreadAdminHolder aRet(new ThreadAdmin());
++			return aRet;
+ 		}
 -		return pThreadAdmin;
-+	struct theThreadAdmin : public rtl::Static< ThreadAdmin, theThreadAdmin > {};
++	};
  
-+	ThreadAdmin& ThreadAdmin::getInstance()
++	ThreadAdminHolder& ThreadAdmin::getInstance()
 +	{
 +		return theThreadAdmin::get();
  	}
  
  // ----------------------------------------------------------------------------------
-@@ -127,7 +120,7 @@
+@@ -119,12 +118,13 @@
+ 									const ByteSequence &aThreadId,
+ 									sal_Bool bAsynchron )
+ 		: m_thread( 0 )
++		, m_aThreadAdmin( ThreadAdmin::getInstance() )
+ 		, m_pQueue( pQueue )
+ 		, m_aThreadId( aThreadId )
  		, m_bAsynchron( bAsynchron )
  		, m_bDeleteSelf( sal_True )
  	{
 -		ThreadAdmin::getInstance()->add( this );
-+		ThreadAdmin::getInstance().add( this );
++		m_aThreadAdmin->add( this );
  	}
  
  
-@@ -169,7 +162,7 @@
+@@ -166,7 +166,7 @@
  
  	void ORequestThread::onTerminated()
  	{
 -		ThreadAdmin::getInstance()->remove( this );
-+		ThreadAdmin::getInstance().remove( this );
++		m_aThreadAdmin->remove( this );
  		if( m_bDeleteSelf )
  		{
  			delete this;
-@@ -178,6 +171,8 @@
+@@ -175,6 +175,8 @@
  
  	void ORequestThread::run()
  	{
@@ -112,7 +119,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  		while ( m_pQueue )
  		{
  			if( ! m_bAsynchron )
-@@ -200,7 +195,7 @@
+@@ -197,7 +199,7 @@
  
  				if( m_pQueue->isEmpty() )
  				{
@@ -121,7 +128,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  					// Note : revokeQueue might have failed because m_pQueue.isEmpty()
  					//        may be false (race).
  				}
-@@ -214,7 +209,7 @@
+@@ -211,7 +213,7 @@
  				uno_releaseIdFromCurrentThread();
  			}
  
@@ -130,22 +137,37 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  		}
  	}
  }
-diff -ru OOO320_m6/cppu/source/threadpool/thread.hxx OOO320_m6/cppu/source/threadpool/thread.hxx
---- OOO320_m6/cppu/source/threadpool/thread.hxx	2008-04-11 11:34:18.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/thread.hxx	2009-12-02 15:58:34.000000000 +0000
-@@ -74,7 +74,7 @@
+--- cppu/source/threadpool/thread.hxx	2008-04-11 11:34:18.000000000 +0100
++++ cppu/source/threadpool/thread.hxx	2009-12-02 15:58:34.000000000 +0000
+@@ -37,6 +37,8 @@
+ namespace cppu_threadpool {
+ 
+ 	class JobQueue;
++	class ThreadAdmin;
++	typedef boost::shared_ptr<ThreadAdmin> ThreadAdminHolder;
+ 	
+     //-----------------------------------------
+     // private thread class for the threadpool
+@@ -61,6 +63,7 @@
+ 		
+ 	private:
+ 		oslThread m_thread;
++		ThreadAdminHolder m_aThreadAdmin;
+ 		JobQueue *m_pQueue;
+ 		::rtl::ByteSequence m_aThreadId;
+ 		sal_Bool m_bAsynchron;
+@@ -71,7 +74,7 @@
  	{
  	public:
  		~ThreadAdmin ();
 -		static ThreadAdmin *getInstance();
-+		static ThreadAdmin &getInstance();
++		static ThreadAdminHolder &getInstance();
  		void add( ORequestThread * );
  		void remove( ORequestThread * );
  		void join();
-diff -ru OOO320_m6/cppu/source/threadpool/threadpool.cxx OOO320_m6/cppu/source/threadpool/threadpool.cxx
---- OOO320_m6/cppu/source/threadpool/threadpool.cxx	2008-04-11 11:34:54.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/threadpool.cxx	2009-12-03 16:14:56.000000000 +0000
-@@ -36,6 +36,7 @@
+--- cppu/source/threadpool/threadpool.cxx	2008-04-11 11:34:54.000000000 +0100
++++ cppu/source/threadpool/threadpool.cxx	2009-12-03 16:14:56.000000000 +0000
+@@ -33,6 +33,7 @@
  #include <osl/diagnose.h>
  #include <osl/mutex.hxx>
  #include <osl/thread.h>
@@ -153,7 +175,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  
  #include <uno/threadpool.h>
  
-@@ -47,19 +48,17 @@
+@@ -44,19 +45,17 @@
  
  namespace cppu_threadpool
  {
@@ -182,7 +204,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	}
  
  	DisposedCallerAdmin::~DisposedCallerAdmin()
-@@ -110,6 +109,21 @@
+@@ -107,6 +106,21 @@
  
  
  	//-------------------------------------------------------------------------------
@@ -204,7 +226,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	ThreadPool::~ThreadPool()
  	{
  #if OSL_DEBUG_LEVEL > 1
-@@ -119,19 +133,9 @@
+@@ -116,19 +130,9 @@
  		}
  #endif
  	}
@@ -226,7 +248,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	}
  
  
-@@ -139,7 +143,7 @@
+@@ -136,7 +140,7 @@
  	{
  		if( nDisposeId )
  		{
@@ -235,14 +257,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  
  			MutexGuard guard( m_mutex );
  			for( ThreadIdHashMap::iterator ii = m_mapQueue.begin() ;
-@@ -168,13 +172,13 @@
- 					osl_setCondition( (*ii)->condition );
- 				}
- 			}
--			ThreadAdmin::getInstance()->join();
-+			ThreadAdmin::getInstance().join();
- 		}
- 	}
+@@ -171,7 +175,7 @@
  
  	void ThreadPool::stopDisposing( sal_Int64 nDisposeId )
  	{
@@ -251,7 +266,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	}
  
  	/******************
-@@ -403,7 +407,7 @@
+@@ -400,7 +404,7 @@
  
  
  
@@ -260,7 +275,7 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  
  static ThreadpoolHashSet *g_pThreadpoolHashSet;
  
-@@ -423,7 +427,7 @@
+@@ -420,7 +424,7 @@
  
  	// Just ensure that the handle is unique in the process (via heap)
  	uno_ThreadPool h = new struct _uno_ThreadPool;
@@ -269,9 +284,8 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	return h;
  }
  
-diff -ru OOO320_m6/cppu/source/threadpool/threadpool.hxx OOO320_m6/cppu/source/threadpool/threadpool.hxx
---- OOO320_m6/cppu/source/threadpool/threadpool.hxx	2008-04-11 11:35:13.000000000 +0100
-+++ OOO320_m6/cppu/source/threadpool/threadpool.hxx	2009-12-02 16:12:13.000000000 +0000
+--- cppu/source/threadpool/threadpool.hxx	2008-04-11 11:35:13.000000000 +0100
++++ cppu/source/threadpool/threadpool.hxx	2009-12-02 16:12:13.000000000 +0000
 @@ -33,6 +33,8 @@
  
  #include <rtl/byteseq.hxx>
@@ -325,9 +339,8 @@ diff -ru OOO320_m6/cppu/source/threadpoo
  	};
  
  } // end namespace cppu_threadpool
-diff -ru OOO320_m6/cppu/source/uno/lbenv.cxx OOO320_m6/cppu/source/uno/lbenv.cxx
---- OOO320_m6/cppu/source/uno/lbenv.cxx	2009-02-12 10:18:09.000000000 +0000
-+++ OOO320_m6/cppu/source/uno/lbenv.cxx	2009-12-03 16:14:26.000000000 +0000
+--- cppu/source/uno/lbenv.cxx	2009-02-12 10:18:09.000000000 +0000
++++ cppu/source/uno/lbenv.cxx	2009-12-03 16:14:26.000000000 +0000
 @@ -142,6 +142,7 @@
      ::osl::Mutex mutex;
      OUString2EnvironmentMap aName2EnvMap;
@@ -369,9 +382,8 @@ diff -ru OOO320_m6/cppu/source/uno/lbenv
  
      for ( OUString2EnvironmentMap::const_iterator iPos( aName2EnvMap.begin() );
            iPos != aName2EnvMap.end(); ++iPos )
-diff -ru OOO320_m6/cppu/util/target.pmk OOO320_m6/cppu/util/target.pmk
---- OOO320_m6/cppu/util/target.pmk	2008-04-11 12:07:15.000000000 +0100
-+++ OOO320_m6/cppu/util/target.pmk	2009-12-02 15:50:08.000000000 +0000
+--- cppu/util/target.pmk	2008-04-11 12:07:15.000000000 +0100
++++ cppu/util/target.pmk	2009-12-02 15:50:08.000000000 +0000
 @@ -55,12 +55,3 @@
  .ENDIF
  
@@ -385,3 +397,456 @@ diff -ru OOO320_m6/cppu/util/target.pmk 
 -.ENDIF
 -.ENDIF
 -
+--- sax/source/tools/fastserializer.cxx	2010-06-22 12:54:56.000000000 +0100
++++ sax/source/tools/fastserializer.cxx	2010-06-22 13:14:30.000000000 +0100
+@@ -27,6 +27,7 @@
+ 
+ #include "fastserializer.hxx"
+ #include <rtl/ustrbuf.hxx>
++#include <rtl/byteseq.hxx>
+ 
+ #include <com/sun/star/xml/Attribute.hpp>
+ #include <com/sun/star/xml/FastAttribute.hpp>
+@@ -41,6 +42,7 @@
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::uno::toUnoSequence;
+ using ::com::sun::star::xml::FastAttribute;
+ using ::com::sun::star::xml::Attribute;
+ using ::com::sun::star::xml::sax::SAXException;
+@@ -52,15 +54,15 @@
+ using ::com::sun::star::io::IOException;
+ using ::com::sun::star::io::BufferSizeExceededException;
+ 
+-static Sequence< sal_Int8 > aClosingBracket((sal_Int8 *)">", 1);
+-static Sequence< sal_Int8 > aSlashAndClosingBracket((sal_Int8 *)"/>", 2);
+-static Sequence< sal_Int8 > aColon((sal_Int8 *)":", 1);
+-static Sequence< sal_Int8 > aOpeningBracket((sal_Int8 *)"<", 1);
+-static Sequence< sal_Int8 > aOpeningBracketAndSlash((sal_Int8 *)"</", 2);
+-static Sequence< sal_Int8 > aQuote((sal_Int8 *)"\"", 1);
+-static Sequence< sal_Int8 > aEqualSignAndQuote((sal_Int8 *)"=\"", 2);
+-static Sequence< sal_Int8 > aSpace((sal_Int8 *)" ", 1);
+-static Sequence< sal_Int8 > aXmlHeader((sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56);
++static rtl::ByteSequence aClosingBracket((const sal_Int8 *)">", 1);
++static rtl::ByteSequence aSlashAndClosingBracket((const sal_Int8 *)"/>", 2);
++static rtl::ByteSequence aColon((const sal_Int8 *)":", 1);
++static rtl::ByteSequence aOpeningBracket((const sal_Int8 *)"<", 1);
++static rtl::ByteSequence aOpeningBracketAndSlash((const sal_Int8 *)"</", 2);
++static rtl::ByteSequence aQuote((const sal_Int8 *)"\"", 1);
++static rtl::ByteSequence aEqualSignAndQuote((const sal_Int8 *)"=\"", 2);
++static rtl::ByteSequence aSpace((const sal_Int8 *)" ", 1);
++static rtl::ByteSequence aXmlHeader((const sal_Int8*) "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n", 56);
+ 
+ #define HAS_NAMESPACE(x) ((x & 0xffff0000) != 0)
+ #define NAMESPACE(x) (x >> 16)
+@@ -74,7 +76,7 @@
+ 	{
+ 		if (!mxOutputStream.is())
+ 			return;
+-		writeBytes(aXmlHeader);
++		writeBytes(toUnoSequence(aXmlHeader));
+ 	}
+ 
+ 	OUString FastSaxSerializer::escapeXml( const OUString& s )
+@@ -116,7 +118,7 @@
+     {
+         if( HAS_NAMESPACE( nElement ) ) {
+             writeBytes(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
+-            writeBytes(aColon);
++            writeBytes(toUnoSequence(aColon));
+             writeBytes(mxFastTokenHandler->getUTF8Identifier(TOKEN(nElement)));
+         } else
+             writeBytes(mxFastTokenHandler->getUTF8Identifier(nElement));
+@@ -128,12 +130,12 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracket);
++		writeBytes(toUnoSequence(aOpeningBracket));
+ 
+         writeId(Element);
+ 		writeFastAttributeList(Attribs);
+ 
+-		writeBytes(aClosingBracket);
++		writeBytes(toUnoSequence(aClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::startUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
+@@ -142,19 +144,19 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracket);
++		writeBytes(toUnoSequence(aOpeningBracket));
+ 
+ 		if (Namespace.getLength())
+ 		{
+ 			write(Namespace);
+-			writeBytes(aColon);
++			writeBytes(toUnoSequence(aColon));
+ 		}
+ 		
+ 		write(Name);
+ 		
+ 		writeFastAttributeList(Attribs);
+ 			
+-		writeBytes(aClosingBracket);
++		writeBytes(toUnoSequence(aClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::endFastElement( ::sal_Int32 Element )
+@@ -163,11 +165,11 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracketAndSlash);
++		writeBytes(toUnoSequence(aOpeningBracketAndSlash));
+ 
+         writeId(Element);
+ 
+-		writeBytes(aClosingBracket);
++		writeBytes(toUnoSequence(aClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::endUnknownElement( const OUString& Namespace, const OUString& Name )
+@@ -176,17 +178,17 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracketAndSlash);
++		writeBytes(toUnoSequence(aOpeningBracketAndSlash));
+ 
+ 		if (Namespace.getLength())
+ 		{
+ 			write(Namespace);
+-			writeBytes(aColon);
++			writeBytes(toUnoSequence(aColon));
+ 		}
+ 		
+ 		write(Name);
+ 		
+-		writeBytes(aClosingBracket);
++		writeBytes(toUnoSequence(aClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::singleFastElement( ::sal_Int32 Element, const Reference< XFastAttributeList >& Attribs )
+@@ -195,12 +197,12 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracket);
++		writeBytes(toUnoSequence(aOpeningBracket));
+ 
+         writeId(Element);
+ 		writeFastAttributeList(Attribs);
+ 
+-		writeBytes(aSlashAndClosingBracket);
++		writeBytes(toUnoSequence(aSlashAndClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::singleUnknownElement( const OUString& Namespace, const OUString& Name, const Reference< XFastAttributeList >& Attribs )
+@@ -209,19 +211,19 @@
+ 		if (!mxOutputStream.is())
+ 			return;
+ 
+-		writeBytes(aOpeningBracket);
++		writeBytes(toUnoSequence(aOpeningBracket));
+ 
+ 		if (Namespace.getLength())
+ 		{
+ 			write(Namespace);
+-			writeBytes(aColon);
++			writeBytes(toUnoSequence(aColon));
+ 		}
+ 		
+ 		write(Name);
+ 
+ 		writeFastAttributeList(Attribs);
+ 			
+-		writeBytes(aSlashAndClosingBracket);
++		writeBytes(toUnoSequence(aSlashAndClosingBracket));
+ 	}
+ 
+     void SAL_CALL FastSaxSerializer::characters( const OUString& aChars )
+@@ -251,12 +253,12 @@
+ 		sal_Int32 nAttrLength = aAttrSeq.getLength();
+ 		for (sal_Int32 i = 0; i < nAttrLength; i++)
+ 		{
+-			writeBytes(aSpace);
++			writeBytes(toUnoSequence(aSpace));
+ 
+ 			write(pAttr[i].Name);
+-			writeBytes(aEqualSignAndQuote);
++			writeBytes(toUnoSequence(aEqualSignAndQuote));
+ 			write(escapeXml(pAttr[i].Value));
+-			writeBytes(aQuote);
++			writeBytes(toUnoSequence(aQuote));
+ 		}
+ 		
+ 		Sequence< FastAttribute > aFastAttrSeq = Attribs->getFastAttributes();
+@@ -264,16 +266,16 @@
+ 		sal_Int32 nFastAttrLength = aFastAttrSeq.getLength();
+ 		for (sal_Int32 j = 0; j < nFastAttrLength; j++)
+ 		{
+-			writeBytes(aSpace);
++			writeBytes(toUnoSequence(aSpace));
+ 
+             sal_Int32 nToken = pFastAttr[j].Token;
+             writeId(nToken);
+ 			
+-			writeBytes(aEqualSignAndQuote);
++			writeBytes(toUnoSequence(aEqualSignAndQuote));
+ 	
+ 			write(escapeXml(Attribs->getValue(pFastAttr[j].Token)));
+ 			
+-			writeBytes(aQuote);
++			writeBytes(toUnoSequence(aQuote));
+ 		}
+ 	}
+ 
+--- package/inc/ZipPackageFolder.hxx	2010-06-22 11:49:17.000000000 +0100
++++ package/inc/ZipPackageFolder.hxx	2010-06-22 12:50:26.000000000 +0100
+@@ -53,8 +53,6 @@
+ 	::com::sun::star::container::XEnumerationAccess
+ >
+ {
+-	static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
+-
+ protected:
+ 	ContentHash maContents;
+ 	const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+@@ -82,10 +80,7 @@
+ 		throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ 
+ 	static void copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource);
+-	static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId()
+-	{
+-		return aImplementationId;
+-	}
++	static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
+ 
+ 	void setPackageFormat_Impl( sal_Int16 nFormat ) { m_nFormat = nFormat; }
+ 	void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
+--- package/source/xstor/owriteablestream.cxx	2010-06-22 11:49:15.000000000 +0100
++++ package/source/xstor/owriteablestream.cxx	2010-06-22 12:13:20.000000000 +0100
+@@ -53,6 +53,7 @@
+ 
+ #include <rtl/digest.h>
+ #include <rtl/logfile.hxx>
++#include <rtl/instance.hxx>
+ 
+ // since the copying uses 32000 blocks usually, it makes sense to have a smaller size
+ #define MAX_STORCACHE_SIZE 30000
+@@ -2169,25 +2170,14 @@
+ 	return m_pData->m_pTypeCollection->getTypes() ;
+ }
+ 
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ //-----------------------------------------------
+ uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId()
+ 		throw( uno::RuntimeException )
+ {
+-	static ::cppu::OImplementationId* pID = NULL ;
+-
+-	if ( pID == NULL )
+-	{
+-		::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
+-
+-		if ( pID == NULL )
+-		{
+-			static ::cppu::OImplementationId aID( sal_False ) ;
+-			pID = &aID ;
+-		}
+-	}
+-
+-	return pID->getImplementationId() ;
+-
++    ::cppu::OImplementationId &rId = lcl_ImplId::get();
++    return rId.getImplementationId();
+ }
+ 
+ //-----------------------------------------------
+--- package/source/xstor/xstorage.cxx	2010-06-22 11:49:15.000000000 +0100
++++ package/source/xstor/xstorage.cxx	2010-06-22 12:11:45.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include <cppuhelper/typeprovider.hxx>
+ #include <cppuhelper/exc_hlp.hxx>
+ #include <rtl/logfile.hxx>
++#include <rtl/instance.hxx>
+ 
+ #include <comphelper/processfactory.hxx>
+ #include <comphelper/componentcontext.hxx>
+@@ -2367,25 +2368,14 @@
+ 	return m_pData->m_pTypeCollection->getTypes() ;
+ }
+ 
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ //-----------------------------------------------
+ uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
+ 		throw( uno::RuntimeException )
+ {
+-	static ::cppu::OImplementationId* pID = NULL ;
+-
+-	if ( pID == NULL )
+-	{
+-		::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
+-
+-		if ( pID == NULL )
+-		{
+-			static ::cppu::OImplementationId aID( sal_False ) ;
+-			pID = &aID ;
+-		}
+-	}
+-
+-	return pID->getImplementationId() ;
+-
++    ::cppu::OImplementationId &rID = lcl_ImplId::get();
++    return rID.getImplementationId();
+ }
+ 
+ //____________________________________________________________________________________________________
+--- package/source/zippackage/ZipPackage.cxx	2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackage.cxx	2010-06-22 12:12:00.000000000 +0100
+@@ -68,6 +68,7 @@
+ #include <rtl/uri.hxx>
+ #include <rtl/random.h>
+ #include <rtl/logfile.hxx>
++#include <rtl/instance.hxx>
+ #include <osl/time.h>
+ #include <osl/file.hxx>
+ #include "com/sun/star/io/XAsyncOutputMonitor.hpp"
+@@ -1585,21 +1586,14 @@
+ 										   static_getSupportedServiceNames());
+ }
+ 
++namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
++
+ // XUnoTunnel
+ Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void ) 
+ 	throw (RuntimeException)
+ {
+-	static ::cppu::OImplementationId * pId = 0;
+-	if (! pId)
+-	{
+-		::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+-		if (! pId)
+-		{
+-			static ::cppu::OImplementationId aId;
+-			pId = &aId;
+-		}
+-	}
+-	return pId->getImplementationId();
++    ::cppu::OImplementationId &rId = lcl_ImplId::get();
++    return rId.getImplementationId();
+ }
+ 
+ sal_Int64 SAL_CALL ZipPackage::getSomething( const Sequence< sal_Int8 >& aIdentifier ) 
+--- package/source/zippackage/ZipPackageFolder.cxx	2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageFolder.cxx	2010-06-22 12:50:00.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include <com/sun/star/io/XSeekable.hpp>
+ #include <EncryptedDataHeader.hxx>
+ #include <rtl/random.h>
++#include <rtl/instance.hxx>
+ #include <memory>
+ 
+ using namespace com::sun::star::packages::zip::ZipConstants;
+@@ -58,7 +59,7 @@
+ using namespace ::com::sun::star;
+ using vos::ORef;
+ 
+-Sequence < sal_Int8 > ZipPackageFolder::aImplementationId = Sequence < sal_Int8 > ();
++namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
+ 
+ ZipPackageFolder::ZipPackageFolder ( const Reference< XMultiServiceFactory >& xFactory,
+ 									 sal_Int16 nFormat,
+@@ -79,10 +80,9 @@
+ 	aEntry.nCompressedSize	= 0;
+ 	aEntry.nSize		= 0;
+ 	aEntry.nOffset		= -1;
+-	if ( !aImplementationId.getLength() )
+-        {
+-		aImplementationId = getImplementationId();
+-        }
++	Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
++	if ( !rCachedImplId.getLength() )
++	    rCachedImplId = getImplementationId();
+ }
+ 
+ 
+@@ -186,6 +186,11 @@
+     rDest.nExtraLen			= rSource.nExtraLen;
+ }
+ 
++const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageFolder::static_getImplementationId()
++{
++    return lcl_CachedImplId::get();
++}
++
+ 	// XNameContainer
+ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const Any& aElement ) 
+ 		throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+--- package/source/zippackage/ZipPackageStream.cxx	2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageStream.cxx	2010-06-22 12:53:32.000000000 +0100
+@@ -45,6 +45,8 @@
+ #include <comphelper/seekableinput.hxx>
+ #include <comphelper/storagehelper.hxx>
+ 
++#include <rtl/instance.hxx>
++
+ #include <PackageConstants.hxx>
+ 
+ using namespace com::sun::star::packages::zip::ZipConstants;
+@@ -55,8 +57,12 @@
+ using namespace cppu;
+ using namespace rtl;
+ 
+-Sequence < sal_Int8 > ZipPackageStream::aImplementationId = Sequence < sal_Int8 > ();
++namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
+ 
++const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageStream::static_getImplementationId()
++{
++    return lcl_CachedImplId::get();
++}
+ 
+ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
+ 									const Reference< XMultiServiceFactory >& xFactory,
+@@ -91,10 +97,9 @@
+ 	aEntry.nPathLen		= -1;
+ 	aEntry.nExtraLen	= -1;
+ 
+-	if ( !aImplementationId.getLength() )
+-        {
+-            aImplementationId = getImplementationId();
+-        }
++	Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
++	if ( !rCachedImplId.getLength() )
++	    rCachedImplId = getImplementationId();
+ }
+ 
+ ZipPackageStream::~ZipPackageStream( void )
+--- package/source/zippackage/ZipPackageStream.hxx	2010-06-22 11:49:16.000000000 +0100
++++ package/source/zippackage/ZipPackageStream.hxx	2010-06-22 12:51:18.000000000 +0100
+@@ -55,7 +55,6 @@
+ 	::com::sun::star::packages::XDataSinkEncrSupport
+ >
+ {
+-	static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
+ protected:
+ 	com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
+ 	const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+@@ -146,10 +145,7 @@
+     ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData()
+ 		throw(::com::sun::star::uno::RuntimeException);
+ 	
+-	static ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId()
+-	{
+-		return aImplementationId;
+-	}
++	static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
+ 
+ 	// XActiveDataSink
+     virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream ) 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-13/openoffice.org.spec,v
retrieving revision 1.2203
retrieving revision 1.2204
diff -u -p -r1.2203 -r1.2204
--- openoffice.org.spec	24 Jun 2010 12:53:17 -0000	1.2203
+++ openoffice.org.spec	25 Jun 2010 19:09:10 -0000	1.2204
@@ -1,6 +1,6 @@
 %define oootag OOO320
 %define ooomilestone 12
-%define rh_rpm_release 26
+%define rh_rpm_release 27
 
 # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
 %define __jar_repack %{nil}
@@ -1757,7 +1757,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
 %patch92 -p0 -b .ooo112384.sw.export.doc.styledoesntexist.patch
 %patch93 -p0 -b .workspace.gtkfpicker9.patch
 %patch94 -p0 -b .ooo112516.sw.avoid.divbyzero.patch
-%patch95 -p1 -b .ooo107490.cppu.lifecycle.patch
+%patch95 -p0 -b .ooo107490.cppu.lifecycle.patch
 %patch96 -p0 -b .ooo112567.vcl.embeddedbitmaps.patch
 %patch97 -p1 -b .ooo112657.sw.rtf.dont-crash-on-merged-cells-without-clmgf.patch
 
@@ -4245,10 +4245,13 @@ fi
 %endif
 
 %changelog
-* Thu Jun 24 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.26
-- Resolves: rhbz#606021 openoffice.org-3.3.0.ooo112567.vcl.embeddedbitmaps.patch
+* Fri Jun 25 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.27.UNBUILT
+- Resolves: rhbz#608114 cppu-licecycle issues
 - Resolves: rhbz#566831 [abrt] crash in GetFrmSize (dtardon)
 
+* Mon Jun 21 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.26
+- Resolves: rhbz#606021 openoffice.org-3.3.0.ooo112567.vcl.embeddedbitmaps.patch
+
 * Fri Jun 18 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.25
 - Resolves: rhbz#602631 dual head fixes add workspace.ooo321gsl05.patch
 - Resolves: rhbz#603298 crash in ImplFontCharMap::GetGlyphIndex



More information about the scm-commits mailing list