1. mst
  2. ooo340

Commits

ihi  committed 37efb03

CWS-TOOLING: integrate CWS bfshrink02
2009-03-27 09:30:29 +0100 cmc r270134 : #i100589# remove always NULL pDocTopics
2009-03-26 13:22:26 +0100 cmc r270074 : #i100589# remove latest set of unused methods and files

  • Participants
  • Parent commits d39ff48
  • Branches default

Comments (0)

Files changed (58)

File binfilter/bf_forms/source/inc/ids.hxx

View file
 #ifndef _FRM_IDS_HXX_
 #define _FRM_IDS_HXX_
 
-#ifndef _UNOTOOLS_ID_HELPER_HXX_
-#include <unotools/idhelper.hxx>
-#endif
+#include <bf_svtools/idhelper.hxx>
 namespace binfilter {
 
-DECLARE_IMPLEMENTATIONID_HELPER(frm, OImplementationIds)
+DECLARE_IMPLEMENTATIONID_HELPER_SMALL(frm, OImplementationIds)
 
 }//end of namespace binfilter
 #endif // _FRM_IDS_HXX_

File binfilter/bf_forms/source/misc/forms_ids.cxx

View file
 #include "ids.hxx"
 namespace binfilter {
 
-IMPLEMENT_IMPLEMENTATIONID_HELPER(frm, OImplementationIds)
+IMPLEMENT_IMPLEMENTATIONID_HELPER_SMALL(frm, OImplementationIds)
 
 
 }

File binfilter/bf_goodies/source/base3d/goodies_b3dcompo.cxx

View file
 |*
 \************************************************************************/
 
-BASE3D_IMPL_BUCKET(B3dEdgeList, Bucket)
+SV_IMPL_VARARR(B3dEdgeListBucketMemArr, char*)
+B3dEdgeListBucket::B3dEdgeListBucket(UINT16 TheSize) {
+	InitializeSize(TheSize);
+}
+void B3dEdgeListBucket::InitializeSize(UINT16 TheSize) {
+	UINT16 nSiz;
+	for(nShift=0,nSiz=1;nSiz<sizeof(B3dEdgeList);nSiz<<=1,nShift++);
+	nBlockShift = TheSize - nShift;
+	nMask = (1L << nBlockShift)-1L;
+	nSlotSize = 1<<nShift;
+	nEntriesPerArray = (UINT16)((1L << TheSize) >> nShift);
+	Empty();
+}
+void B3dEdgeListBucket::operator=(const B3dEdgeListBucket& rObj) {
+	Erase();
+	B3dEdgeListBucket& rSrc = (B3dEdgeListBucket&)rObj;
+	for(UINT32 a=0;a<rSrc.Count();a++)
+		Append(rSrc[a]);
+}
+void B3dEdgeListBucket::Empty() {
+	for(UINT16 i=0;i<aMemArray.Count();i++)
+		/*#90353#*/ delete [] aMemArray[i];
+	if(aMemArray.Count())
+		aMemArray.Remove(0, aMemArray.Count());
+	nFreeMemArray = 0;
+	nActMemArray = -1;
+	Erase();
+}
+void B3dEdgeListBucket::Erase() {
+	nFreeEntry = nEntriesPerArray;
+	nCount = 0;
+	nActMemArray = -1;
+}
+B3dEdgeListBucket::~B3dEdgeListBucket() {
+	Empty();
+}
+BOOL B3dEdgeListBucket::ImplAppend(B3dEdgeList& rVec) {
+	*((B3dEdgeList*)(aMemArray[nActMemArray] + (nFreeEntry++ << nShift))) = rVec;
+	nCount++;
+	return TRUE;
+}
+BOOL B3dEdgeListBucket::ImplAppend() {
+	nFreeEntry++;
+	nCount++;
+	return TRUE;
+}
+BOOL B3dEdgeListBucket::ImplCareForSpace() {
+	/* neues array bestimmem */
+	if(nActMemArray + 1 < nFreeMemArray) {
+		/* ist scon allokiert, gehe auf naechstes */
+		nActMemArray++;
+	} else {
+		/* neues muss allokiert werden */
+		char* pNew = new char[nEntriesPerArray << nShift];
+		if(!pNew)
+			return FALSE;
+		aMemArray.Insert((const char*&) pNew, aMemArray.Count());
+		nActMemArray = nFreeMemArray++;
+	}
+	nFreeEntry = 0;
+	return TRUE;
+}
+B3dEdgeList& B3dEdgeListBucket::operator[] (UINT32 nPos) {
+	if(nPos >= nCount) {
+		DBG_ERROR("Access to Bucket out of range!");
+		return *((B3dEdgeList*)aMemArray[0]);
+	}
+	return *((B3dEdgeList*)(aMemArray[(UINT16)(nPos >> nBlockShift)] + ((nPos & nMask) << nShift)));
+}
 
 /*************************************************************************
 |*
 |*
 \************************************************************************/
 
-BASE3D_IMPL_BUCKET(B3dEdgeEntry, Bucket)
+SV_IMPL_VARARR(B3dEdgeEntryBucketMemArr, char*)
+B3dEdgeEntryBucket::B3dEdgeEntryBucket(UINT16 TheSize) {
+	InitializeSize(TheSize);
+}
+void B3dEdgeEntryBucket::InitializeSize(UINT16 TheSize) {
+	UINT16 nSiz;
+	for(nShift=0,nSiz=1;nSiz<sizeof(B3dEdgeEntry);nSiz<<=1,nShift++);
+	nBlockShift = TheSize - nShift;
+	nMask = (1L << nBlockShift)-1L;
+	nSlotSize = 1<<nShift;
+	nEntriesPerArray = (UINT16)((1L << TheSize) >> nShift);
+	Empty();
+}
+void B3dEdgeEntryBucket::operator=(const B3dEdgeEntryBucket& rObj) {
+	Erase();
+	B3dEdgeEntryBucket& rSrc = (B3dEdgeEntryBucket&)rObj;
+	for(UINT32 a=0;a<rSrc.Count();a++)
+		Append(rSrc[a]);
+}
+void B3dEdgeEntryBucket::Empty() {
+	for(UINT16 i=0;i<aMemArray.Count();i++)
+		/*#90353#*/ delete [] aMemArray[i];
+	if(aMemArray.Count())
+		aMemArray.Remove(0, aMemArray.Count());
+	nFreeMemArray = 0;
+	nActMemArray = -1;
+	Erase();
+}
+void B3dEdgeEntryBucket::Erase() {
+	nFreeEntry = nEntriesPerArray;
+	nCount = 0;
+	nActMemArray = -1;
+}
+B3dEdgeEntryBucket::~B3dEdgeEntryBucket() {
+	Empty();
+}
+BOOL B3dEdgeEntryBucket::ImplAppend(B3dEdgeEntry& rVec) {
+	*((B3dEdgeEntry*)(aMemArray[nActMemArray] + (nFreeEntry++ << nShift))) = rVec;
+	nCount++;
+	return TRUE;
+}
+BOOL B3dEdgeEntryBucket::ImplAppend() {
+	nFreeEntry++;
+	nCount++;
+	return TRUE;
+}
+BOOL B3dEdgeEntryBucket::ImplCareForSpace() {
+	/* neues array bestimmem */
+	if(nActMemArray + 1 < nFreeMemArray) {
+		/* ist scon allokiert, gehe auf naechstes */
+		nActMemArray++;
+	} else {
+		/* neues muss allokiert werden */
+		char* pNew = new char[nEntriesPerArray << nShift];
+		if(!pNew)
+			return FALSE;
+		aMemArray.Insert((const char*&) pNew, aMemArray.Count());
+		nActMemArray = nFreeMemArray++;
+	}
+	nFreeEntry = 0;
+	return TRUE;
+}
+B3dEdgeEntry& B3dEdgeEntryBucket::operator[] (UINT32 nPos) {
+	if(nPos >= nCount) {
+		DBG_ERROR("Access to Bucket out of range!");
+		return *((B3dEdgeEntry*)aMemArray[0]);
+	}
+	return *((B3dEdgeEntry*)(aMemArray[(UINT16)(nPos >> nBlockShift)] + ((nPos & nMask) << nShift))); 
+}
 
 /*************************************************************************
 |*

File binfilter/bf_goodies/source/base3d/goodies_b3dgeom.cxx

View file
 |*
 \************************************************************************/
 
-BASE3D_IMPL_BUCKET(GeometryIndexValue, Bucket)
+SV_IMPL_VARARR(GeometryIndexValueBucketMemArr, char*)
+GeometryIndexValueBucket::GeometryIndexValueBucket(UINT16 TheSize) {
+	InitializeSize(TheSize);
+}
+void GeometryIndexValueBucket::InitializeSize(UINT16 TheSize) {
+	UINT16 nSiz;
+	for(nShift=0,nSiz=1;nSiz<sizeof(GeometryIndexValue);nSiz<<=1,nShift++);
+	nBlockShift = TheSize - nShift;
+	nMask = (1L << nBlockShift)-1L;
+	nSlotSize = 1<<nShift;
+	nEntriesPerArray = (UINT16)((1L << TheSize) >> nShift);
+	Empty();
+}
+void GeometryIndexValueBucket::operator=(const GeometryIndexValueBucket& rObj) {
+	Erase();
+	GeometryIndexValueBucket& rSrc = (GeometryIndexValueBucket&)rObj;
+	for(UINT32 a=0;a<rSrc.Count();a++)
+		Append(rSrc[a]);
+}
+void GeometryIndexValueBucket::Empty() {
+	for(UINT16 i=0;i<aMemArray.Count();i++)
+		/*#90353#*/ delete [] aMemArray[i];
+	if(aMemArray.Count())
+		aMemArray.Remove(0, aMemArray.Count());
+	nFreeMemArray = 0;
+	nActMemArray = -1;
+	Erase();
+}
+void GeometryIndexValueBucket::Erase() {
+	nFreeEntry = nEntriesPerArray;
+	nCount = 0;
+	nActMemArray = -1;
+}
+GeometryIndexValueBucket::~GeometryIndexValueBucket() {
+	Empty();
+}
+BOOL GeometryIndexValueBucket::ImplAppend(GeometryIndexValue& rVec) {
+	*((GeometryIndexValue*)(aMemArray[nActMemArray] + (nFreeEntry++ << nShift))) = rVec;
+	nCount++;
+	return TRUE;
+}
+BOOL GeometryIndexValueBucket::ImplCareForSpace() {
+	/* neues array bestimmem */
+	if(nActMemArray + 1 < nFreeMemArray) {
+		/* ist scon allokiert, gehe auf naechstes */
+		nActMemArray++;
+	} else {
+		/* neues muss allokiert werden */
+		char* pNew = new char[nEntriesPerArray << nShift];
+		if(!pNew)
+			return FALSE;
+		aMemArray.Insert((const char*&) pNew, aMemArray.Count());
+		nActMemArray = nFreeMemArray++;
+	}
+	nFreeEntry = 0;
+	return TRUE;
+}
+GeometryIndexValue& GeometryIndexValueBucket::operator[] (UINT32 nPos) {
+	if(nPos >= nCount) {
+		DBG_ERROR("Access to Bucket out of range!");
+		return *((GeometryIndexValue*)aMemArray[0]);
+	}
+	return *((GeometryIndexValue*)(aMemArray[(UINT16)(nPos >> nBlockShift)] + ((nPos & nMask) << nShift)));
+}
 
 /*************************************************************************
 |*

File binfilter/bf_sc/source/ui/docshell/sc_docsh.cxx

View file
 /*N*/ 
 /*N*/ 	delete pAutoStyleList;
 /*N*/ 
-/*N*/ 	SfxApplication *pSfxApp = SFX_APP();
-/*N*/ 	if ( pSfxApp->GetDdeService() )				// DDE vor Dokument loeschen
-/*N*/ 		pSfxApp->RemoveDdeTopic( this );
-/*N*/ 
 /*N*/ 	delete pDocFunc;
 /*N*/ 	delete pFontList;
 /*N*/ 

File binfilter/bf_sc/source/ui/unoobj/sc_cellsuno.cxx

View file
 	return 0;	// soll nicht sein
 }
 
-BOOL lcl_WholeSheet( const ScRangeList& rRanges )
-{
-	if ( rRanges.Count() == 1 )
-	{
-		ScRange* pRange = rRanges.GetObject(0);
-		if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL &&
-					   pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW )
-			return TRUE;
-	}
-	return FALSE;
-}
-
 //------------------------------------------------------------------------
 
 ScSubTotalFunc lcl_SummaryToSubTotal( sheet::GeneralFunction eSummary )
 
 //------------------------------------------------------------------------
 
-// Default-ctor fuer SMART_REFLECTION Krempel
-ScCellRangesBase::ScCellRangesBase() :
-	pDocShell( NULL ),
-	aPropSet(lcl_GetCellsPropertyMap()),
-	bChartColAsHdr( FALSE ),
-	bChartRowAsHdr( FALSE ),
-	bCursorOnly( FALSE ),
-	pCurrentFlat( NULL ),
-	pCurrentDeep( NULL ),
-	pCurrentDataSet( NULL ),
-	pValueListener( NULL ),
-	bValueChangePosted( FALSE ),
-	pMarkData( NULL ),
-	aValueListeners( 0 )
-{
-}
-
 ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
 	pDocShell( pDocSh ),
 	aPropSet(lcl_GetCellsPropertyMap()),

File binfilter/bf_sd/source/ui/unoidl/sd_unopage.cxx

View file
 	}
 }
 
-UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage );
+const ::com::sun::star::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() throw()
+{
+        static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+        if( !pSeq )
+        {
+                ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+                if( !pSeq )
+                {
+                        static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+                        rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+                        pSeq = &aSeq;
+                }
+        }
+        return *pSeq;
+}
+
+sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) 
+{
+        if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+                                                                                                                 rId.getConstArray(), 16 ) )
+        {
+                return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
+        }
+        else
+        {
+                return SvxFmDrawPage::getSomething( rId );
+        }
+}
 
 /***********************************************************************
 *                                                                      *

File binfilter/bf_sd/source/ui/unoidl/unopage.hxx

View file
 	SdPage* GetPage() const { return (SdPage*)pPage; }
 	SdXImpressDocument* GetModel() const { return mpModel; }
 
-	UNO3_GETIMPLEMENTATION_DECL( SdGenericDrawPage )
+        static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
 
 	// this is called whenever a SdrObject must be created for a empty api shape wrapper
 	virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw();

File binfilter/bf_sfx2/source/appl/sfx2_appdata.cxx

View file
 /*N*/ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
 /*N*/ 		pProgress(0),
 /*N*/ 		pPool(0),
-/*N*/ 		pDdeService( 0 ),
-/*N*/ 		pDocTopics( 0 ),
 /*N*/ 		pEventConfig(0),
 /*N*/ 		nBasicCallLevel(0),
 /*N*/ 		nRescheduleLocks(0),
 			pThisDocument(0),
 /*N*/ 		pMatcher( 0 ),
 /*N*/ 		pCancelMgr( 0 ),
-/*N*/ 		pTriggerTopic(0),
-/*N*/ 		pDdeService2(0),
 /*N*/ 		pMiscConfig(0),
 /*N*/ 		bInQuit(sal_False),
 /*N*/ 		bInException( sal_False ),
 
 /*N*/ SfxAppData_Impl::~SfxAppData_Impl()
 /*N*/ {
-/*N*/   DeInitDDE();
 /*N*/ 	delete pCancelMgr;
 /*N*/ }
 }

File binfilter/bf_sfx2/source/appl/sfx2_appdde.cxx

View file
 
 namespace binfilter {
 
-class ImplDdeService : public DdeService
-{
-public:
-	ImplDdeService( const String& rNm )
-		: DdeService( rNm )
-	{}
-	virtual BOOL MakeTopic( const String& );
-
-	virtual String	Topics();
-//	virtual String	Formats();
-//	virtual String	SysItems();
-//	virtual String	Status();
-
-	virtual BOOL SysTopicExecute( const String* pStr );
-};
-
-class SfxDdeTriggerTopic_Impl : public DdeTopic
-{
-public:
-	SfxDdeTriggerTopic_Impl()
-	: DdeTopic( DEFINE_CONST_UNICODE("TRIGGER") )
-	{}
-
-	virtual BOOL Execute( const String* );
-};
-
-class SfxDdeDocTopic_Impl : public DdeTopic
-{
-public:
-	SfxObjectShell* pSh;
-	DdeData aData;
-	::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
-
-	SfxDdeDocTopic_Impl( SfxObjectShell* pShell )
-		: DdeTopic( pShell->GetTitle(SFX_TITLE_FULLNAME) ), pSh( pShell )
-	{}
-
-	virtual DdeData* Get( ULONG );
-	virtual BOOL Put( const DdeData* );
-	virtual BOOL Execute( const String* );
-	virtual BOOL StartAdviseLoop();
-	virtual BOOL MakeItem( const String& rItem );
-
-// wird benoetigt?
-//	virtual void Connect( long n );
-//	virtual void Disconnect( long n );
-//	virtual void StopAdviseLoop();
-
-};
-
-
-SV_DECL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl * const, 4, 4 )
-SV_IMPL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl * const )
-
-//========================================================================
-
-
-//-------------------------------------------------------------------------
-
-
-//--------------------------------------------------------------------
-
-
-//--------------------------------------------------------------------
-
-
-//--------------------------------------------------------------------
-
-
 //========================================================================
 
 /*?*/ long SfxObjectShell::DdeExecute
 /*?*/ {DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 
 /*?*/ }
 
-//========================================================================
-
-/*N*/ void SfxAppData_Impl::DeInitDDE()
-/*N*/ {
-/*N*/     DELETEZ( pTriggerTopic );
-/*N*/     DELETEZ( pDdeService2 );
-/*N*/     DELETEZ( pDocTopics );
-/*N*/     DELETEZ( pDdeService );
-/*N*/ }
-
 //--------------------------------------------------------------------
-
-
-/*N*/ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
-/*N*/ {
-// #i30187# DDE not needed for binfilter/*N*/ 	DBG_ASSERT( pAppData_Impl->pDocTopics, "es gibt gar keinen Dde-Service" )
-/*N*/ 	//OV: Im Serverbetrieb ist DDE abgeklemmt!
-/*N*/ 	if( !pAppData_Impl->pDocTopics )
-/*N*/ 		return;
-/*N*/ 
-/*N*/ }
-
-
-/*N*/ DdeService* SfxApplication::GetDdeService()
-/*N*/ {
-/*N*/ 	return pAppData_Impl->pDdeService;
-/*N*/ }
-
-//--------------------------------------------------------------------
-
-/*?*/ BOOL ImplDdeService::MakeTopic( const String& rNm )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-/*?*/ String ImplDdeService::Topics()
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); String aRet; return aRet;//STRIP001 
-/*?*/ }
-
-/*?*/ BOOL ImplDdeService::SysTopicExecute( const String* pStr )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-//--------------------------------------------------------------------
-
-/*?*/ BOOL SfxDdeTriggerTopic_Impl::Execute( const String* pStr )
-{DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-//--------------------------------------------------------------------
-/*?*/ DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return NULL;//STRIP001 
-/*?*/ }
-
-/*?*/ BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-/*?*/ BOOL SfxDdeDocTopic_Impl::Execute( const String* pStr )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-/*?*/ BOOL SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-/*?*/ BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
-/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return FALSE;//STRIP001 
-/*?*/ }
-
-
 }

File binfilter/bf_sfx2/source/doc/sfx2_objxtor.cxx

View file
 /*N*/ 	if( pImp->pDialogLibContainer )
 /*N*/ 		pImp->pDialogLibContainer->release();
 /*N*/ 
-/*N*/ 	if ( pSfxApp->GetDdeService() )
-/*N*/ 		pSfxApp->RemoveDdeTopic( this );
-/*N*/ 
 /*N*/ 	delete pImp->pDocInfo;
 /*N*/ 	if ( pImp->xModel.is() )
 /*N*/ 		pImp->xModel = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > ();

File binfilter/bf_sfx2/source/inc/appdata.hxx

View file
 
 namespace binfilter {
 
-class DdeService;
 class SvUShorts;
 class SfxItemPool;
 class SfxCancelManager;
 class ISfxTemplateCommon;
 class SfxFilterMatcher;
 class SfxStatusDispatcher;
-class SfxDdeTriggerTopic_Impl;
 class SfxMiscCfg;
 class SfxDocumentTemplates;
 class SfxFrameArr_Impl;
 public:
     IndexBitSet                         aIndexBitSet;           // for counting noname documents
 
-    // DDE stuff
-    DdeService*                         pDdeService;
-	SfxDdeDocTopics_Impl*               pDocTopics;
-	SfxDdeTriggerTopic_Impl*            pTriggerTopic;
-	DdeService*                         pDdeService2;
-
     // single instance classes
 	SfxFrameObjectFactoryPtr*           pSfxFrameObjectFactoryPtr;
 
 
                                         SfxAppData_Impl( SfxApplication* );
                                         ~SfxAppData_Impl();
-
-    void                                DeInitDDE();
 };
 
 }//end of namespace binfilter

File binfilter/bf_so3/source/dialog/plfilter.cxx

View file
 typedef map< String, StrSet, ltstr > FilterMap;
 
 
-//==================================================================================================
-void fillNetscapePluginFilters( Sequence< rtl::OUString >& rPluginNames, Sequence< rtl::OUString >& rPluginTypes )
-{
-	Reference< XMultiServiceFactory > xMan( ::utl::getProcessServiceFactory() );
-	Reference< XPluginManager > xPMgr( xMan->createInstance(
-		rtl::OUString::createFromAscii("com.sun.star.plugin.PluginManager") ), UNO_QUERY );
-
-	if ( xPMgr.is() )
-	{
-		FilterMap aMap;
-
-		// mimetypes zusammenfassen: eine description, mehrere extensions
-
-		Sequence<PluginDescription > aDescriptions( xPMgr->getPluginDescriptions() );
-		const PluginDescription * pDescriptions = aDescriptions.getConstArray();
-		for ( UINT32 nPos = aDescriptions.getLength(); nPos--; )
-		{
-			const PluginDescription & rDescr = pDescriptions[nPos];
-
-			StrSet& rTypes = aMap[ rDescr.Description ];
-			String aExtension( rDescr.Extension );
-
-			for ( USHORT nCnt = aExtension.GetTokenCount( ';' ); nCnt--; )
-			{
-				// no default plugins anymore
-				String aExt( aExtension.GetToken( nCnt, ';' ) );
-				if ( aExt.CompareToAscii( "*.*" ) != COMPARE_EQUAL )
-					rTypes.insert( aExt );
-			}
-		}
-
-        rPluginNames = Sequence< rtl::OUString >( aMap.size() );
-        rPluginTypes = Sequence< rtl::OUString >( aMap.size() );
-        rtl::OUString* pPluginNames = rPluginNames.getArray();
-        rtl::OUString* pPluginTypes = rPluginTypes.getArray();
-        int nIndex = 0;
-		for ( FilterMap::iterator iPos = aMap.begin(); iPos != aMap.end(); ++iPos )
-		{
-			String aText( (*iPos).first );
-			String aType;
-			StrSet& rTypes = (*iPos).second;
-			StrSet::iterator i = rTypes.begin();
-			while ( i != rTypes.end() )
-			{
-				aType += (*i);
-				++i;
-				if ( i != rTypes.end() )
-					aType += ';';
-			}
-
-			if ( aType.Len() )
-			{
-				aText += String::CreateFromAscii( " (" );
-				aText += aType;
-				aText += ')';
-                pPluginNames[nIndex] = aText;
-                pPluginTypes[nIndex] = aType;
-                nIndex++;
-			}
-		}
-        rPluginNames.realloc( nIndex );
-        rPluginTypes.realloc( nIndex );
-	}
-	else
-		ShowServiceNotAvailableError( NULL,
-			String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.plugin.PluginManager" ) ), TRUE );
 }
 
-}
-

File binfilter/bf_so3/source/solink/implbase.hxx

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: implbase.hxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _IMPLBASE_HXX
-#define _IMPLBASE_HXX
-
-#include <tools/solar.h>
-
-namespace binfilter {
-
-class  ImplDdeItem;
-struct Impl_LinkInfo;
-
-// nur fuer die interne Verwaltung
-struct ImplBaseLinkData
-{
-	union {
-		struct
-		{
-			// gilt fuer alle Links
-			ULONG				nCntntType; // Update Format
-			Impl_LinkInfo *		pLinkInfo;  // Information fuer Ole-Link
-
-			// nicht Ole-Links
-			BOOL 			bIntrnlLnk; // ist es ein interner Link
-			USHORT 			nUpdateMode;// UpdateMode
-		} ClientType;
-
-		struct
-		{
-			ImplDdeItem* pItem;
-		} DDEType;
-
-		// und hier fuer So
-		//struct
-		//{
-		//} SoType;
-	};
-
-    ImplBaseLinkData()
-	{
-		ClientType.nCntntType = NULL;
-		ClientType.pLinkInfo = NULL;
-		ClientType.bIntrnlLnk = FALSE;
-		ClientType.nUpdateMode = 0;
-		DDEType.pItem = NULL;
-	}
-};
-
-
-}
-
-#endif
-

File binfilter/bf_so3/source/solink/lnkbase2.cxx

View file
 
 TYPEINIT0( SvBaseLink )
 
-class  ImplDdeItem;
-
 // nur fuer die interne Verwaltung
 struct ImplBaseLinkData
 {
 		USHORT 			nUpdateMode;// UpdateMode
 	};
 
-	struct tDDEType
-	{
-		ImplDdeItem* pItem;
-	};
-
-	union {
-		tClientType ClientType;
-		tDDEType DDEType;
-	};
+	tClientType ClientType;
 	ImplBaseLinkData()
 	{
 		ClientType.nCntntType = 0;
 		ClientType.bIntrnlLnk = FALSE;
 		ClientType.nUpdateMode = 0;
-		DDEType.pItem = NULL;
 	}
 };
 
 
-class ImplDdeItem : public DdeGetPutItem
-{
-	SvBaseLink* pLink;
-	DdeData aData;
-	Sequence< sal_Int8 > aSeq;		    // Datacontainer for DdeData !!!
-	BOOL bIsValidData : 1;
-	BOOL bIsInDTOR : 1;
-public:
-	ImplDdeItem( SvBaseLink& rLink, const String& rStr )
-		: DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( FALSE ),
-		bIsInDTOR( FALSE )
-	{}
-	virtual ~ImplDdeItem();
-
-	virtual DdeData* Get( ULONG );
-	virtual BOOL Put( const DdeData* );
-	virtual void AdviseLoop( BOOL );
-
-	void Notify()
-	{
-		bIsValidData = FALSE;
-		DdeGetPutItem::NotifyClient();
-	}
-
-	BOOL IsInDTOR() const { return bIsInDTOR; }
-};
-
-
 /************************************************************************
 |*	  SvBaseLink::SvBaseLink()
 |*
 {
 	Disconnect();
 
-	switch( nObjType )
-	{
-	case OBJECT_DDE_EXTERN:
-		if( !pImplData->DDEType.pItem->IsInDTOR() )
-			delete pImplData->DDEType.pItem;
-		break;
-	}
-
 	delete pImplData;
 }
 
 
 void SvBaseLink::DataChanged( const String &, const ::com::sun::star::uno::Any & )
 {
-	switch( nObjType )
-	{
-	case OBJECT_DDE_EXTERN:
-		if( pImplData->DDEType.pItem )
-			pImplData->DDEType.pItem->Notify();
-		break;
-	}
 }
 
 
 		xObj->RemoveAllDataAdvise( this );
 }
 
-
-ImplDdeItem::~ImplDdeItem()
-{
-	bIsInDTOR = TRUE;
-	// damit im Disconnect nicht jemand auf die Idee kommt, den Pointer zu
-	// loeschen!!
-	SvBaseLinkRef aRef( pLink );
-	aRef->Disconnect();
 }
-
-DdeData* ImplDdeItem::Get( ULONG nFormat )
-{
-	if( pLink->GetObj() )
-	{
-		// ist das noch gueltig?
-		if( bIsValidData && nFormat == aData.GetFormat() )
-			return &aData;
-
-		Any aValue;
-		String sMimeType( SotExchange::GetFormatMimeType( nFormat ));
-		if( pLink->GetObj()->GetData( aValue, sMimeType ) )
-		{
-			if( aValue >>= aSeq )
-			{
-				aData = DdeData( (const char *)aSeq.getConstArray(), aSeq.getLength(), nFormat );
-
-				bIsValidData = TRUE;
-				return &aData;
-			}
-		}
-	}
-	aSeq.realloc( 0 );
-	bIsValidData = FALSE;
-	return 0;
-}
-
-
-BOOL ImplDdeItem::Put( const DdeData*  )
-{
-	DBG_ERROR( "ImplDdeItem::Put not implemented" );
-	return FALSE;
-}
-
-
-void ImplDdeItem::AdviseLoop( BOOL bOpen )
-{
-	// Verbindung wird geschlossen, also Link abmelden
-	if( pLink->GetObj() )
-	{
-		if( bOpen )
-		{
-			// es wird wieder eine Verbindung hergestellt
-			if( OBJECT_DDE_EXTERN == pLink->GetObjType() )
-			{
-				pLink->GetObj()->AddDataAdvise( pLink, String::CreateFromAscii( "text/plain;charset=utf-16" ),	ADVISEMODE_NODATA );
-				pLink->GetObj()->AddConnectAdvise( pLink );
-			}
-		}
-		else
-		{
-			// damit im Disconnect nicht jemand auf die Idee kommt,
-			// den Pointer zu loeschen!!
-			SvBaseLinkRef aRef( pLink );
-			aRef->Disconnect();
-		}
-	}
-}
-
-}

File binfilter/bf_svtools/source/config/makefile.mk

View file
 	$(SLO)$/svt_extendedsecurityoptions.obj \
 	$(SLO)$/svt_sourceviewconfig.obj		\
 	$(SLO)$/svt_compatibility.obj           \
-	$(SLO)$/svt_eventcfg.obj                \
     $(SLO)$/svt_optionsdlg.obj              \
     $(SLO)$/svt_itemholder1.obj \
     $(SLO)$/svt_options.obj \
     $(SLO)$/svt_ctloptions.obj          \
     $(SLO)$/svt_cjkoptions.obj          \
     $(SLO)$/svt_colorcfg.obj            \
-    $(SLO)$/svt_extcolorcfg.obj            \
     $(SLO)$/svt_undoopt.obj                 \
     $(SLO)$/svt_useroptions.obj      \
     $(SLO)$/svt_syslocaleoptions.obj \

File binfilter/bf_svtools/source/config/svt_cmdoptions.cxx

View file
 
     	virtual void Commit();
 
-		//---------------------------------------------------------------------------------------------------------
-		//	public interface
-		//---------------------------------------------------------------------------------------------------------
-
-		/*-****************************************************************************************************//**
-            @short      base implementation of public interface for "SvtDynamicMenuOptions"!
-            @descr      These class is used as static member of "SvtDynamicMenuOptions" ...
-						=> The code exist only for one time and isn't duplicated for every instance!
-
-			@seealso	-
-
-			@param		-
-			@return		-
-
-			@onerror	-
-		*//*-*****************************************************************************************************/
-
-        void					Clear       (	SvtCommandOptions::CmdOption	eCmdOption	);
-		sal_Bool				Lookup		(	SvtCommandOptions::CmdOption	eCmdOption,	const OUString& ) const;
-        Sequence< OUString >	GetList		(	SvtCommandOptions::CmdOption	eCmdOption	) const ;
-        void					AddCommand	(	SvtCommandOptions::CmdOption	eCmdOption,
-												const OUString& sURL		);
-        void EstablisFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame);
-
 	//-------------------------------------------------------------------------------------------------------------
 	//	private methods
 	//-------------------------------------------------------------------------------------------------------------
 }
 
 //*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void SvtCommandOptions_Impl::Clear( SvtCommandOptions::CmdOption eCmdOption )
-{
-    switch( eCmdOption )
-	{
-		case SvtCommandOptions::CMDOPTION_DISABLED:
-		{
-			m_aDisabledCommands.Clear();
-            SetModified();
-		}
-        break;
-
-		default:
-			DBG_ASSERT( sal_False, "SvtCommandOptions_Impl::Clear()\nUnknown option type given!\n" );
-	}
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-Sequence< OUString > SvtCommandOptions_Impl::GetList( SvtCommandOptions::CmdOption eCmdOption ) const
-{
-    Sequence< OUString > lReturn;
-
-	switch( eCmdOption )
-	{
-        case SvtCommandOptions::CMDOPTION_DISABLED:
-		{
-			lReturn = m_aDisabledCommands.GetList();
-		}
-        break;
-
-		default:
-			DBG_ASSERT( sal_False, "SvtCommandOptions_Impl::GetList()\nUnknown option type given!\n" );
-	}
-
-	return lReturn;
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-sal_Bool SvtCommandOptions_Impl::Lookup( SvtCommandOptions::CmdOption eCmdOption, const OUString& aCommand ) const
-{
-    switch( eCmdOption )
-	{
-        case SvtCommandOptions::CMDOPTION_DISABLED:
-		{
-			return m_aDisabledCommands.Lookup( aCommand );
-		}
-		default:
-			DBG_ASSERT( sal_False, "SvtCommandOptions_Impl::GetList()\nUnknown option type given!\n" );
-	}
-
-	return sal_False;
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void SvtCommandOptions_Impl::AddCommand( SvtCommandOptions::CmdOption eCmdOption, const OUString& sCmd )
-{
-    switch( eCmdOption )
-	{
-        case SvtCommandOptions::CMDOPTION_DISABLED:
-		{
-			m_aDisabledCommands.AddCommand( sCmd );
-			SetModified();
-		}
-		break;
-
-		default:
-			DBG_ASSERT( sal_False, "SvtCommandOptions_Impl::GetList()\nUnknown option type given!\n" );
-	}
-}
-
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void SvtCommandOptions_Impl::EstablisFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame)
-{
-    // check if frame already exists inside list
-    // ignore double registrations
-    // every frame must be notified one times only!
-    ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > xWeak(xFrame);
-    SvtFrameVector::const_iterator pIt = ::std::find(m_lFrames.begin(), m_lFrames.end(), xWeak);
-    if (pIt == m_lFrames.end())
-        m_lFrames.push_back(xWeak);
-}
-
-//*****************************************************************************************************************
 //	private method
 //*****************************************************************************************************************
 Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames()
 }
 
 //*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void SvtCommandOptions::Clear( CmdOption eCmdOption )
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pDataContainer->Clear( eCmdOption );
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-sal_Bool SvtCommandOptions::Lookup( CmdOption eCmdOption, const OUString& aCommandURL ) const
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pDataContainer->Lookup( eCmdOption, aCommandURL );
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-Sequence< OUString > SvtCommandOptions::GetList( CmdOption eCmdOption ) const
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pDataContainer->GetList( eCmdOption );
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void SvtCommandOptions::AddCommand( CmdOption eCmdOption, const OUString& sURL )
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pDataContainer->AddCommand( eCmdOption, sURL );
-}
-
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void SvtCommandOptions::EstablisFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pDataContainer->EstablisFrameCallback(xFrame);
-}
-
-//*****************************************************************************************************************
 //	private method
 //*****************************************************************************************************************
 Mutex& SvtCommandOptions::GetOwnStaticMutex()

File binfilter/bf_svtools/source/config/svt_eventcfg.cxx

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: svt_eventcfg.cxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-
-
-#include "eventcfg.hxx"
-
-#ifndef _UTL_CONFIGMGR_HXX_
-#include <unotools/configmgr.hxx>
-#endif
-
-#ifndef _UTL_CONFIGITEM_HXX_
-#include <unotools/configitem.hxx>
-#endif
-
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
-#include <com/sun/star/uno/Any.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
-#include <com/sun/star/uno/Sequence.hxx>
-#endif
-
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
-#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-
-#ifndef _CPPUHELPER_WEAKREF_HXX_
-#include <cppuhelper/weakref.hxx>
-#endif
-
-#ifndef __SGI_STL_HASH_MAP
-#include <hash_map>
-#endif
-
-#ifndef _URLOBJ_HXX
-#include <tools/urlobj.hxx>
-#endif
-
-#ifndef _RTL_USTRBUF_HXX_
-#include <rtl/ustrbuf.hxx>
-#endif
-
-#include <itemholder1.hxx>
-
-#include <algorithm>
-
-using namespace ::std					;
-using namespace ::utl					;
-using namespace ::rtl					;
-using namespace ::osl					;
-using namespace ::com::sun::star::uno	;
-using namespace ::com::sun::star;
-
-namespace binfilter
-{
-
-#define ROOTNODE_EVENTS OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Events/ApplicationEvents" ))
-#define PATHDELIMITER OUString(RTL_CONSTASCII_USTRINGPARAM("/"))
-#define SETNODE_BINDINGS OUString(RTL_CONSTASCII_USTRINGPARAM("Bindings" ))
-#define PROPERTYNAME_BINDINGURL OUString(RTL_CONSTASCII_USTRINGPARAM("BindingURL"))
-
-GlobalEventConfig_Impl::GlobalEventConfig_Impl()
-    :   ConfigItem( ROOTNODE_EVENTS, CONFIG_MODE_IMMEDIATE_UPDATE )
-{
-    // the supported event names
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnStartApp"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnCloseApp"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnNew"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnUnload"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnPrepareUnload"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnLoad"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnSave"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnSaveAs"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnSaveDone"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnSaveAsDone"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnFocus"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnUnfocus"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnPrint"));
-    m_supportedEvents.push_back(::rtl::OUString::createFromAscii("OnModifyChanged"));
-
-    initBindingInfo();
-    
-/*TODO: Not used in the moment! see Notify() ...
-	// Enable notification mechanism of our baseclass.
-	// We need it to get information about changes outside these class on our used configuration keys! */
-    Sequence< OUString > aNotifySeq( 1 );
-    aNotifySeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Events" ));
-    EnableNotification( aNotifySeq, sal_True );
-}
-
-//*****************************************************************************************************************
-//	destructor
-//*****************************************************************************************************************
-GlobalEventConfig_Impl::~GlobalEventConfig_Impl()
-{
-	// We must save our current values .. if user forget it!
-	if( IsModified() == sal_True )
-	{
-		Commit();
-	}
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void GlobalEventConfig_Impl::Notify( const Sequence< OUString >& )
-{
-    MutexGuard aGuard( GlobalEventConfig::GetOwnStaticMutex() );
-
-    initBindingInfo(); 
-
-    // dont forget to update all existing frames and her might cached dispatch objects!
-    // But look for already killed frames. We hold weak references instead of hard ones ...
-    for (FrameVector::const_iterator pIt  = m_lFrames.begin();
-                                        pIt != m_lFrames.end()  ;
-                                      ++pIt                     )
-    {
-        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame(pIt->get(), ::com::sun::star::uno::UNO_QUERY);
-        if (xFrame.is())
-            xFrame->contextChanged();
-    }
-}
-
-//*****************************************************************************************************************
-//	public method
-//*****************************************************************************************************************
-void GlobalEventConfig_Impl::Commit()
-{
-    //DF need to check it this is correct??
-    OSL_TRACE("In GlobalEventConfig_Impl::Commit");
-    EventBindingHash::const_iterator it = m_eventBindingHash.begin();
-    EventBindingHash::const_iterator it_end = m_eventBindingHash.end();
-    // clear the existing nodes
-    ClearNodeSet( SETNODE_BINDINGS );
-    Sequence< beans::PropertyValue > seqValues( 1 );
-    OUString sNode;
-    //step through the list of events
-    for(int i=0;it!=it_end;++it,++i)
-    {
-        //no point in writing out empty bindings!
-        if(it->second.getLength() == 0 )
-            continue;
-        sNode = SETNODE_BINDINGS + PATHDELIMITER + OUString::createFromAscii("BindingType['") + it->first + OUString::createFromAscii("']") + PATHDELIMITER + PROPERTYNAME_BINDINGURL;
-        OSL_TRACE("writing binding for: %s",::rtl::OUStringToOString(sNode , RTL_TEXTENCODING_ASCII_US ).pData->buffer);
-        seqValues[ 0 ].Name = sNode;
-        seqValues[ 0 ].Value <<= it->second;
-        //write the data to the registry
-        SetSetProperties(SETNODE_BINDINGS,seqValues);
-    }
-}
-
-//*****************************************************************************************************************
-//  public method
-//*****************************************************************************************************************
-void GlobalEventConfig_Impl::EstablishFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame)
-{
-    // check if frame already exists inside list
-    // ignore double registrations
-    // every frame must be notified one times only!
-    ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > xWeak(xFrame);
-    FrameVector::const_iterator pIt = ::std::find(m_lFrames.begin(), m_lFrames.end(), xWeak);
-    if (pIt == m_lFrames.end())
-        m_lFrames.push_back(xWeak);
-}
-
-//*****************************************************************************************************************
-//	private method
-//*****************************************************************************************************************
-void GlobalEventConfig_Impl::initBindingInfo()
-{
-	// Get ALL names of current existing list items in configuration!
-    Sequence< OUString > lEventNames      = GetNodeNames( SETNODE_BINDINGS, utl::CONFIG_NAME_LOCAL_PATH );
-
-	OUString aSetNode( SETNODE_BINDINGS );
-	aSetNode += PATHDELIMITER;
-
-	OUString aCommandKey( PATHDELIMITER );
-	aCommandKey += PROPERTYNAME_BINDINGURL;
-
-	// Expand all keys
-    Sequence< OUString > lMacros(1);
-	for (sal_Int32 i=0; i<lEventNames.getLength(); ++i )
-	{
-		OUStringBuffer aBuffer( 32 );
-		aBuffer.append( aSetNode );
-		aBuffer.append( lEventNames[i] );
-		aBuffer.append( aCommandKey );
-		lMacros[0] = aBuffer.makeStringAndClear();
-        OSL_TRACE("reading binding for: %s",::rtl::OUStringToOString(lMacros[0] , RTL_TEXTENCODING_ASCII_US ).pData->buffer);
-        Sequence< Any > lValues = GetProperties( lMacros );
-        OUString sMacroURL;
-        if( lValues.getLength() > 0 )
-        {
-            lValues[0] >>= sMacroURL;
-            sal_Int32 startIndex = lEventNames[i].indexOf('\'');
-            sal_Int32 endIndex =  lEventNames[i].lastIndexOf('\'');
-            if( startIndex >=0 && endIndex > 0 )
-            {
-                startIndex++;
-                OUString eventName = lEventNames[i].copy(startIndex,endIndex-startIndex);
-                m_eventBindingHash[ eventName ] = sMacroURL;
-            }
-        }
-	}
-}
-
-void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
-{
-    Sequence< beans::PropertyValue > props;
-    //DF should we prepopulate the hash with a list of valid event Names?
-    if( sal_False == ( aElement >>= props ) )
-    {
-        throw lang::IllegalArgumentException( OUString::createFromAscii(""),
-                Reference< XInterface > (), 2);
-    }
-    OUString macroURL;
-    sal_Int32 nPropCount = props.getLength();
-    for( sal_Int32 index = 0 ; index < nPropCount ; ++index )
-    {
-        if ( props[ index ].Name.compareToAscii( "Script" ) == 0 )
-            props[ index ].Value >>= macroURL;
-    }
-    m_eventBindingHash[ aName ] = macroURL;
-    SetModified();
-}
-
-Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
-{
-    Any aRet;
-    Sequence< beans::PropertyValue > props(2);
-    props[0].Name = OUString::createFromAscii("EventType");
-    props[0].Value <<= OUString::createFromAscii("Script");
-    props[1].Name = OUString::createFromAscii("Script");
-    EventBindingHash::const_iterator it = m_eventBindingHash.find( aName );
-    if( it != m_eventBindingHash.end() )
-    {
-        props[1].Value <<= it->second;
-    }
-    else
-    {
-        SupportedEventsVector::const_iterator vit = m_supportedEvents.begin();
-        SupportedEventsVector::const_iterator vit_end = m_supportedEvents.end();
-        for(;vit!=vit_end;++vit)
-        {
-            if(vit->equals(aName))
-            {
-                props[1].Value <<= OUString::createFromAscii("");
-                break;
-            }
-        }
-        if(vit==vit_end)
-            throw container::NoSuchElementException( OUString::createFromAscii("No such element in event configuration"),
-                Reference< XInterface > () );
-    }
-    aRet <<= props;
-    return aRet;
-}
-
-Sequence< OUString > SAL_CALL GlobalEventConfig_Impl::getElementNames(  ) throw (RuntimeException)
-{
-    Sequence< OUString > ret(m_supportedEvents.size());
-    SupportedEventsVector::const_iterator it = m_supportedEvents.begin();
-    SupportedEventsVector::const_iterator it_end = m_supportedEvents.end();
-    for(int i=0;it!=it_end;++it,++i)
-    {
-        ret[ i ] = *it;
-    }
-    return ret;
-}
-
-sal_Bool SAL_CALL GlobalEventConfig_Impl::hasByName( const OUString& aName ) throw (RuntimeException)
-{
-    return ( m_eventBindingHash.find( aName ) != m_eventBindingHash.end() );
-}
-
-Type SAL_CALL GlobalEventConfig_Impl::getElementType(  ) throw (RuntimeException)
-{
-    //DF definitly not sure about this??
-    return ::getCppuType((const Sequence<beans::PropertyValue>*)0);
-}
-
-sal_Bool SAL_CALL GlobalEventConfig_Impl::hasElements(  ) throw (RuntimeException)
-{
-    return ( m_eventBindingHash.empty() );
-}
-
-// and now the wrapper
-
-
-//initialize static member
-GlobalEventConfig_Impl*     GlobalEventConfig::m_pImpl = NULL  ;
-sal_Int32                   GlobalEventConfig::m_nRefCount      = 0     ;
-
-GlobalEventConfig::GlobalEventConfig()
-{
-    // Global access, must be guarded (multithreading!).
-    MutexGuard aGuard( GetOwnStaticMutex() );
-	// Increase our refcount ...
-	++m_nRefCount;
-	// ... and initialize our data container only if it not already exist!
-    if( m_pImpl == NULL )
-	{
-        m_pImpl = new GlobalEventConfig_Impl;
-        ItemHolder1::holdConfigItem(E_EVENTCFG);
-	}
-}
-
-GlobalEventConfig::~GlobalEventConfig()
-{
-    // Global access, must be guarded (multithreading!)
-    MutexGuard aGuard( GetOwnStaticMutex() );
-	// Decrease our refcount.
-	--m_nRefCount;
-	// If last instance was deleted ...
-	// we must destroy our static data container!
-    if( m_nRefCount <= 0 )
-	{
-		delete m_pImpl;
-		m_pImpl = NULL;
-	}
-}
-
-void GlobalEventConfig::EstablishFrameCallback(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pImpl->EstablishFrameCallback( xFrame );
-}
-
-Reference< container::XNameReplace > SAL_CALL GlobalEventConfig::getEvents() throw (::com::sun::star::uno::RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    Reference< container::XNameReplace > ret(this);
-    return ret;
-}
-
-void SAL_CALL GlobalEventConfig::replaceByName( const OUString& aName, const Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    m_pImpl->replaceByName( aName, aElement );
-}
-Any SAL_CALL GlobalEventConfig::getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pImpl->getByName( aName );
-}
-Sequence< OUString > SAL_CALL GlobalEventConfig::getElementNames(  ) throw (RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pImpl->getElementNames( );
-}
-sal_Bool SAL_CALL GlobalEventConfig::hasByName( const OUString& aName ) throw (RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pImpl->hasByName( aName );
-}
-Type SAL_CALL GlobalEventConfig::getElementType(  ) throw (RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pImpl->getElementType( );
-}
-sal_Bool SAL_CALL GlobalEventConfig::hasElements(  ) throw (RuntimeException)
-{
-    MutexGuard aGuard( GetOwnStaticMutex() );
-    return m_pImpl->hasElements( );
-}
-
-Mutex& GlobalEventConfig::GetOwnStaticMutex()
-{
-	// Initialize static mutex only for one time!
-    static Mutex* pMutex = NULL;
-	// If these method first called (Mutex not already exist!) ...
-    if( pMutex == NULL )
-    {
-		// ... we must create a new one. Protect following code with 
-        // the global mutex -
-		// It must be - we create a static variable!
-        MutexGuard aGuard( Mutex::getGlobalMutex() );
-		// We must check our pointer again - because it can be that 
-        // another instance of our class will be faster then these!
-        if( pMutex == NULL )
-        {
-			// Create the new mutex and set it for return on static variable.
-            static Mutex aMutex;
-            pMutex = &aMutex;
-        }
-    }
-	// Return new created or already existing mutex object.
-    return *pMutex;
-}
-
-}

File binfilter/bf_svtools/source/config/svt_extcolorcfg.cxx

-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: svt_extcolorcfg.cxx,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "extcolorcfg.hxx"
-
-#ifndef _COM_SUN_STAR_UNO_ANY_HXX_
-#include <com/sun/star/uno/Any.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
-#include <com/sun/star/uno/Sequence.hxx>
-#endif
-#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
-#include <com/sun/star/lang/Locale.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
-#include <com/sun/star/beans/PropertyValue.hpp>
-#endif
-#ifndef _TOOLS_COLOR_HXX
-#include <tools/color.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _UTL_CONFIGITEM_HXX_
-#include <unotools/configitem.hxx>
-#endif
-#ifndef UNOTOOLS_CONFIGPATHES_HXX_INCLUDED
-#include <unotools/configpathes.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
-#include <com/sun/star/uno/Sequence.h>
-#endif
-#ifndef _SFXPOOLITEM_HXX
-#include <bf_svtools/poolitem.hxx> //Any2Bool
-#endif
-#ifndef _SFXSMPLHINT_HXX
-#include <bf_svtools/smplhint.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-
- /* #100822# ----
-#ifndef _SV_WRKWIN_HXX
-#include <vcl/wrkwin.hxx>
-#endif
- ------------- */
-#ifndef _SV_SVAPP_HXX
-#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_EVENT_HXX
-#include <vcl/event.hxx>
-#endif
-#ifndef INCLUDED_RTL_INSTANCE_HXX
-#include <rtl/instance.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
-#include <comphelper/stl_types.hxx>
-#endif
-
-
-//-----------------------------------------------------------------------------
-using namespace utl;
-using namespace rtl;
-using namespace com::sun::star;
-
-namespace binfilter
-{
-
-#define C2U(cChar) OUString::createFromAscii(cChar)
-sal_Int32            nExtendedColorRefCount_Impl = 0;
-namespace 
-{
-    struct ColorMutex_Impl 
-        : public rtl::Static< ::osl::Mutex, ColorMutex_Impl > {}; 
-}
-
-ExtendedColorConfig_Impl*    ExtendedColorConfig::m_pImpl = NULL;
-
-/* -----------------------------16.01.01 15:36--------------------------------
- ---------------------------------------------------------------------------*/
-class ExtendedColorConfig_Impl : public utl::ConfigItem, public SfxBroadcaster
-{
-	DECLARE_STL_USTRINGACCESS_MAP( ::rtl::OUString, TDisplayNames);
-	DECLARE_STL_USTRINGACCESS_MAP(ExtendedColorConfigValue,TConfigValues);
-	typedef ::std::vector<TConfigValues::iterator> TMapPos;
-	typedef ::std::pair< TConfigValues, TMapPos > TComponentMapping;
-	DECLARE_STL_USTRINGACCESS_MAP(TComponentMapping,TComponents);
-	TComponents			m_aConfigValues;
-	TDisplayNames		m_aComponentDisplayNames;
-	::std::vector<TComponents::iterator> m_aConfigValuesPos;	
-
-    sal_Bool            m_bEditMode;
-    rtl::OUString       m_sLoadedScheme;
-	sal_Bool			m_bIsBroadcastEnabled;
-    static sal_Bool     m_bLockBroadcast;
-    static sal_Bool     m_bBroadcastWhenUnlocked;
-
-    uno::Sequence< ::rtl::OUString> GetPropertyNames(const rtl::OUString& rScheme);
-	void FillComponentColors(uno::Sequence < ::rtl::OUString >& _rComponents,const TDisplayNames& _rDisplayNames);
-public:
-    ExtendedColorConfig_Impl(sal_Bool bEditMode = sal_False);
-    virtual ~ExtendedColorConfig_Impl();
-
-    void                            Load(const rtl::OUString& rScheme);
-    void                            CommitCurrentSchemeName();
-    //changes the name of the current scheme but doesn't load it!
-    void                            SetCurrentSchemeName(const rtl::OUString& rSchemeName) {m_sLoadedScheme = rSchemeName;}
-	sal_Bool						ExistsScheme(const ::rtl::OUString& _sSchemeName);
-    virtual void                    Commit();
-    virtual void                    Notify( const uno::Sequence<rtl::OUString>& aPropertyNames);
-
-    ExtendedColorConfigValue GetColorConfigValue(const ::rtl::OUString& _sComponentName,const ::rtl::OUString& _sName)
-	{
-		TComponents::iterator aFind = m_aConfigValues.find(_sComponentName);
-		if ( aFind != m_aConfigValues.end() )
-		{
-			TConfigValues::iterator aFind2 = aFind->second.first.find(_sName);
-			if ( aFind != m_aConfigValues.end() )
-				return aFind2->second;
-		}
-		OSL_ENSURE(0,"Could find the required config!");
-		return ExtendedColorConfigValue();
-	}
-
-    const rtl::OUString&            GetLoadedScheme() const {return m_sLoadedScheme;}
-
-    sal_Bool                        AddScheme(const rtl::OUString& rNode);
-    sal_Bool                        RemoveScheme(const rtl::OUString& rNode);
-    void                            SetModified(){ConfigItem::SetModified();}
-    void                            ClearModified(){ConfigItem::ClearModified();}
-    void                            SettingsChanged();
-
-	static sal_Bool					IsEnableBroadcast();
-
-    static void                     LockBroadcast();
-    static void                     UnlockBroadcast();
-
-    // #100822#
-    DECL_LINK( DataChangedEventListener, VclWindowEvent* );
-};
-
-/* -----------------------------16.01.01 15:36--------------------------------
-
- ---------------------------------------------------------------------------*/
-uno::Sequence< OUString> ExtendedColorConfig_Impl::GetPropertyNames(const rtl::OUString& rScheme)
-{
-	uno::Sequence< OUString> aNames(GetNodeNames(rScheme));
-	::rtl::OUString* pIter = aNames.getArray();
-	::rtl::OUString* pEnd	 = pIter + aNames.getLength();
-	::rtl::OUString sSep(RTL_CONSTASCII_USTRINGPARAM("/"));
-	for(;pIter != pEnd;++pIter)
-	{
-		*pIter = rScheme + sSep + *pIter;
-	}
-    return aNames;
-}
-// -----------------------------------------------------------------------------
-/* -----------------------------22.03.2002 14:37------------------------------
-
- ---------------------------------------------------------------------------*/
-sal_Bool ExtendedColorConfig_Impl::m_bLockBroadcast = sal_False;
-sal_Bool ExtendedColorConfig_Impl::m_bBroadcastWhenUnlocked = sal_False;
-ExtendedColorConfig_Impl::ExtendedColorConfig_Impl(sal_Bool bEditMode) :
-    ConfigItem(C2U("Office.ExtendedColorScheme")),
-    m_bEditMode(bEditMode),
-	m_bIsBroadcastEnabled(sal_True)
-{
-    if(!m_bEditMode)
-    {
-        //try to register on the root node - if possible
-        uno::Sequence < ::rtl::OUString > aNames(1);
-        EnableNotification( aNames );
-    }
-    Load(::rtl::OUString());
-
-    // #100822#
-    ::Application::AddEventListener( LINK(this, ExtendedColorConfig_Impl, DataChangedEventListener) );
-
-}
-/* -----------------------------25.03.2002 12:28------------------------------
-
- ---------------------------------------------------------------------------*/
-ExtendedColorConfig_Impl::~ExtendedColorConfig_Impl()
-{
-	// #100822#
-	::Application::RemoveEventListener( LINK(this, ExtendedColorConfig_Impl, DataChangedEventListener) );
-}
-// -----------------------------------------------------------------------------
-sal_Bool ExtendedColorConfig_Impl::IsEnableBroadcast() 
-{ 
-    return ExtendedColorConfig::m_pImpl ? ExtendedColorConfig::m_pImpl->m_bIsBroadcastEnabled : sal_False;
-}
-/* -----------------------------22.03.2002 14:38------------------------------
-
- ---------------------------------------------------------------------------*/
-void lcl_addString(uno::Sequence < ::rtl::OUString >& _rSeq,const ::rtl::OUString& _sAdd)
-{
-	::rtl::OUString* pIter = _rSeq.getArray();
-	::rtl::OUString* pEnd  = pIter + _rSeq.getLength();
-	for(;pIter != pEnd;++pIter)
-		*pIter += _sAdd;
-}
-// -----------------------------------------------------------------------------
-void ExtendedColorConfig_Impl::Load(const rtl::OUString& rScheme)
-{
-	m_aComponentDisplayNames.clear();
-	m_aConfigValuesPos.clear();
-	m_aConfigValues.clear();
-
-	// fill display names
-	TDisplayNames aDisplayNameMap;
-	::rtl::OUString sEntryNames(RTL_CONSTASCII_USTRINGPARAM("EntryNames"));
-	uno::Sequence < ::rtl::OUString > aComponentNames = GetPropertyNames(sEntryNames);
-	::rtl::OUString sDisplayName(RTL_CONSTASCII_USTRINGPARAM("/DisplayName"));
-	::rtl::OUString* pIter = aComponentNames.getArray();
-	::rtl::OUString* pEnd  = pIter + aComponentNames.getLength();
-	for(sal_Int32 i = 0;pIter != pEnd;++pIter,++i)
-	{
-		uno::Sequence < ::rtl::OUString > aComponentDisplayNames(1);
-		aComponentDisplayNames[0] = *pIter;
-		aComponentDisplayNames[0] += sDisplayName;
-		uno::Sequence< uno::Any > aComponentDisplayNamesValue = GetProperties( aComponentDisplayNames );
-		::rtl::OUString sComponentDisplayName;
-		if ( aComponentDisplayNamesValue.getLength() && (aComponentDisplayNamesValue[0] >>= sComponentDisplayName) )
-		{
-			sal_Int32 nIndex = 0;
-			m_aComponentDisplayNames.insert(TDisplayNames::value_type(pIter->getToken(1,'/',nIndex),sComponentDisplayName));
-		}
-
-		*pIter += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Entries"));
-		uno::Sequence < ::rtl::OUString > aDisplayNames = GetPropertyNames(*pIter);
-		lcl_addString(aDisplayNames,sDisplayName);
-
-		uno::Sequence< uno::Any > aDisplayNamesValue = GetProperties( aDisplayNames );
-		
-		const ::rtl::OUString* pDispIter = aDisplayNames.getConstArray();
-		const ::rtl::OUString* pDispEnd  = pDispIter + aDisplayNames.getLength();
-		for(sal_Int32 j = 0;pDispIter != pDispEnd;++pDispIter,++j)
-		{
-			sal_Int32 nIndex = 0;
-			pDispIter->getToken(0,'/',nIndex);
-			::rtl::OUString sName = pDispIter->copy(nIndex);
-			sName = sName.copy(0,sName.lastIndexOf(sDisplayName));
-			::rtl::OUString sCurrentDisplayName;
-			aDisplayNamesValue[j] >>= sCurrentDisplayName;
-			aDisplayNameMap.insert(TDisplayNames::value_type(sName,sCurrentDisplayName));
-		} 
-	}
-
-	// load color settings
-    rtl::OUString sScheme(rScheme);
-	
-    if(!sScheme.getLength())
-    {
-        //detect current scheme name