[Libreoffice-commits] .: binfilter/bf_so3 binfilter/inc

Joseph Powers jpowers at kemper.freedesktop.org
Mon Jan 10 19:15:38 PST 2011


 binfilter/bf_so3/inc/binddata.hxx            |    7 +++--
 binfilter/bf_so3/source/misc/factory.cxx     |    4 +--
 binfilter/bf_so3/source/persist/binddata.cxx |    2 -
 binfilter/bf_so3/source/persist/transprt.cxx |   32 +++++++++++++++++++++------
 binfilter/inc/bf_so3/so2dll.hxx              |    2 -
 5 files changed, 34 insertions(+), 13 deletions(-)

New commits:
commit bf7d6d004d4654800f187215c96d93bd2befe04c
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Jan 10 19:13:29 2011 -0800

    Remove 2 more DECLARE_LIST() items

diff --git a/binfilter/bf_so3/inc/binddata.hxx b/binfilter/bf_so3/inc/binddata.hxx
index f3f89fc..74c941e 100644
--- a/binfilter/bf_so3/inc/binddata.hxx
+++ b/binfilter/bf_so3/inc/binddata.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -31,15 +31,16 @@
 
 #include <tools/solar.h>
 #include <tools/list.hxx>
+#include <vector>
 
 namespace binfilter
 {
 
 class SvBindingTransportFactory;
-DECLARE_LIST (SvBindingTransportFactoryList, SvBindingTransportFactory*)
+typedef ::std::vector< SvBindingTransportFactory* > SvBindingTransportFactoryList;
 
 class SvLockBytesFactory;
-DECLARE_LIST (SvLockBytesFactoryList, SvLockBytesFactory*)
+typedef ::std::vector< SvLockBytesFactory* > SvLockBytesFactoryList;
 
 class SvBindingData_Impl;
 
diff --git a/binfilter/bf_so3/source/misc/factory.cxx b/binfilter/bf_so3/source/misc/factory.cxx
index e58c384..21d588c 100644
--- a/binfilter/bf_so3/source/misc/factory.cxx
+++ b/binfilter/bf_so3/source/misc/factory.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -257,7 +257,7 @@ SvObject* TryCreate( const SvGlobalName& rClassName )
             ::com::sun::star::uno::Sequence < sal_Int8 > aSeq( (sal_Int8*) SvGlobalName( SO3_GLOBAL_CLASSID ).GetBytes(), 16 );
             sal_Int64 nHandle = xObj->getSomething( aSeq );
             if ( nHandle )
-                return reinterpret_cast<SvObject*>(sal::static_int_cast<sal_IntPtr>(nHandle)); 
+                return reinterpret_cast<SvObject*>(sal::static_int_cast<sal_IntPtr>(nHandle));
                 // return (SvObject*) (sal_Int32*) nHandle;
         }
     }
diff --git a/binfilter/bf_so3/source/persist/binddata.cxx b/binfilter/bf_so3/source/persist/binddata.cxx
index dd2db9a..de41d65 100644
--- a/binfilter/bf_so3/source/persist/binddata.cxx
+++ b/binfilter/bf_so3/source/persist/binddata.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
diff --git a/binfilter/bf_so3/source/persist/transprt.cxx b/binfilter/bf_so3/source/persist/transprt.cxx
index e498fe5..b83f77d 100644
--- a/binfilter/bf_so3/source/persist/transprt.cxx
+++ b/binfilter/bf_so3/source/persist/transprt.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -145,13 +145,23 @@ SvBindingTransport::~SvBindingTransport (void)
 SvBindingTransportFactory::SvBindingTransportFactory (void)
 {
     SvBindingTransportFactoryList &rList = BAPP()->m_aTransportFactories;
-    rList.Insert (this, rList.Count());
+    rList.push_back( this );
 }
 
 SvBindingTransportFactory::~SvBindingTransportFactory (void)
 {
     SvBindingTransportFactoryList &rList = BAPP()->m_aTransportFactories;
-    rList.Remove (this);
+    for ( SvBindingTransportFactoryList::iterator it = rList.begin();
+          it < rList.end();
+          ++it
+        )
+    {
+        if ( *it == this )
+        {
+            rList.erase( it );
+            break;
+        }
+    }
 }
 
 SvBindingTransportContext::~SvBindingTransportContext (void)
@@ -170,7 +180,17 @@ SvBindingTransportContext::~SvBindingTransportContext (void)
 SvLockBytesFactory::~SvLockBytesFactory (void)
 {
     SvLockBytesFactoryList &rList = BAPP()->m_aLockBytesFactories;
-    rList.Remove (this);
+    for ( SvLockBytesFactoryList::iterator it = rList.begin();
+          it < rList.end();
+          ++it
+        )
+    {
+        if ( *it == this )
+        {
+            rList.erase( it );
+            break;
+        }
+    }
 }
 
 /*
@@ -181,10 +201,10 @@ SvLockBytesFactory* SvLockBytesFactory::GetFactory (const String &rUrl)
     SvLockBytesFactoryList &rList = BAPP()->m_aLockBytesFactories;
     SvLockBytesFactory *pFactory = NULL;
 
-    ULONG i, n = rList.Count();
+    size_t i, n = rList.size();
     for (i = 0; i < n; i++)
     {
-        pFactory = rList.GetObject(i);
+        pFactory = rList[ i ];
         if (pFactory)
         {
             WildCard aWild (pFactory->GetWildcard());
diff --git a/binfilter/inc/bf_so3/so2dll.hxx b/binfilter/inc/bf_so3/so2dll.hxx
index c931087..65b808b 100644
--- a/binfilter/inc/bf_so3/so2dll.hxx
+++ b/binfilter/inc/bf_so3/so2dll.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite


More information about the Libreoffice-commits mailing list