[Libreoffice-commits] core.git: connectivity/source

Andrzej J.R. Hunt andrzej at ahunt.org
Tue Jul 16 23:59:33 PDT 2013


 connectivity/source/drivers/firebird/FConnection.hxx        |    3 
 connectivity/source/drivers/firebird/FPreparedStatement.cxx |    2 
 connectivity/source/drivers/firebird/FResultSet.cxx         |    2 
 connectivity/source/drivers/firebird/FStatement.cxx         |    2 
 connectivity/source/drivers/firebird/FSubComponent.hxx      |   64 ------------
 5 files changed, 7 insertions(+), 66 deletions(-)

New commits:
commit 09fb28de3b29c426afa4c37e36268e883aa55923
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Wed Jul 17 08:55:24 2013 +0200

    Remove duplication from FSubComponent.
    
    Change-Id: I453eb35ec82cfa632616626385a80d6e0d5cebbc

diff --git a/connectivity/source/drivers/firebird/FConnection.hxx b/connectivity/source/drivers/firebird/FConnection.hxx
index 67771f9..c25390f 100644
--- a/connectivity/source/drivers/firebird/FConnection.hxx
+++ b/connectivity/source/drivers/firebird/FConnection.hxx
@@ -66,14 +66,13 @@ namespace connectivity
                                                 ::com::sun::star::sdbc::XWarningsSupplier,
                                                 ::com::sun::star::lang::XServiceInfo,
                                                 ::com::sun::star::document::XDocumentEventListener
-                                            > OMetaConnection_BASE;
+                                            > OConnection_BASE;
 
         class OStatement_Base;
         class FirebirdDriver;
         class ODatabaseMetaData;
 
 
-        typedef OMetaConnection_BASE                OConnection_BASE; // implements basics and text encoding
         typedef ::std::vector< ::connectivity::OTypeInfo>   TTypeInfoVector;
         typedef std::vector< ::com::sun::star::uno::WeakReferenceHelper > OWeakRefArray;
 
diff --git a/connectivity/source/drivers/firebird/FPreparedStatement.cxx b/connectivity/source/drivers/firebird/FPreparedStatement.cxx
index 8d8a06a..9901064 100644
--- a/connectivity/source/drivers/firebird/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/FPreparedStatement.cxx
@@ -42,7 +42,9 @@
 #include <cppuhelper/typeprovider.hxx>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include "propertyids.hxx"
+#include <comphelper/sequence.hxx>
 
+using namespace ::comphelper;
 using namespace connectivity::firebird;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
diff --git a/connectivity/source/drivers/firebird/FResultSet.cxx b/connectivity/source/drivers/firebird/FResultSet.cxx
index 4af4698..deef30a 100644
--- a/connectivity/source/drivers/firebird/FResultSet.cxx
+++ b/connectivity/source/drivers/firebird/FResultSet.cxx
@@ -42,7 +42,9 @@
 #include <cppuhelper/typeprovider.hxx>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include "propertyids.hxx"
+#include <comphelper/sequence.hxx>
 
+using namespace ::comphelper;
 using namespace connectivity::firebird;
 using namespace cppu;
 using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 2646330..d325726 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -47,7 +47,9 @@
 #include "propertyids.hxx"
 
 #include <ibase.h>
+#include <comphelper/sequence.hxx>
 
+using namespace ::comphelper;
 using namespace connectivity::firebird;
 //------------------------------------------------------------------------------
 using namespace com::sun::star::uno;
diff --git a/connectivity/source/drivers/firebird/FSubComponent.hxx b/connectivity/source/drivers/firebird/FSubComponent.hxx
index 2d98bc0..426a33e 100644
--- a/connectivity/source/drivers/firebird/FSubComponent.hxx
+++ b/connectivity/source/drivers/firebird/FSubComponent.hxx
@@ -71,41 +71,6 @@ namespace connectivity
                      ::com::sun::star::lang::XComponent* _pObject);
 
         void checkDisposed(sal_Bool _bThrow) throw ( ::com::sun::star::lang::DisposedException );
-        //************************************************************
-        // OSubComponent
-        //************************************************************
-        template <class SELF, class WEAK> class OSubComponent
-        {
-        protected:
-            // the parent must support the tunnel implementation
-            ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
-            SELF*   m_pDerivedImplementation;
-
-        public:
-            OSubComponent(
-                    const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParent,
-                    SELF* _pDerivedImplementation)
-                :m_xParent(_xParent)
-                ,m_pDerivedImplementation(_pDerivedImplementation)
-            {
-            }
-
-        protected:
-            void dispose_ChildImpl()
-            {
-                ::osl::MutexGuard aGuard( m_pDerivedImplementation->rBHelper.rMutex );
-                m_xParent = NULL;
-            }
-            void relase_ChildImpl()
-            {
-                release(m_pDerivedImplementation->m_refCount,
-                                        m_pDerivedImplementation->rBHelper,
-                                        m_xParent,
-                                        m_pDerivedImplementation);
-
-                m_pDerivedImplementation->WEAK::release();
-            }
-        };
 
 
         template <class TYPE>
@@ -182,41 +147,12 @@ namespace connectivity
             return s_pProps;
         }
 
-
-
         class OBase_Mutex
         {
         public:
             ::osl::Mutex m_aMutex;
         };
 
-        namespace internal
-        {
-            template <class T>
-            void implCopySequence(const T* _pSource, T*& _pDest, sal_Int32 _nSourceLen)
-            {
-                for (sal_Int32 i=0; i<_nSourceLen; ++i, ++_pSource, ++_pDest)
-                    *_pDest = *_pSource;
-            }
-        }
-        //-------------------------------------------------------------------------
-        /// concat two sequences
-        template <class T>
-        ::com::sun::star::uno::Sequence<T> concatSequences(const ::com::sun::star::uno::Sequence<T>& _rLeft, const ::com::sun::star::uno::Sequence<T>& _rRight)
-        {
-            sal_Int32 nLeft(_rLeft.getLength()), nRight(_rRight.getLength());
-            const T* pLeft = _rLeft.getConstArray();
-            const T* pRight = _rRight.getConstArray();
-
-            sal_Int32 nReturnLen(nLeft + nRight);
-            ::com::sun::star::uno::Sequence<T> aReturn(nReturnLen);
-            T* pReturn = aReturn.getArray();
-
-            internal::implCopySequence(pLeft, pReturn, nLeft);
-            internal::implCopySequence(pRight, pReturn, nRight);
-
-            return aReturn;
-        }
 
 
 


More information about the Libreoffice-commits mailing list