User: rt      
Date: 06/05/04 01:51:14

Modified:
 /dba/dbaccess/source/ui/tabledesign/
  TableRowExchange.cxx

Log:
 INTEGRATION: CWS dba203c (1.2.110); FILE MERGED
 2006/04/13 13:57:19 oj 1.2.110.1: hold TableRow now with a shared_ptr

File Changes:

Directory: /dba/dbaccess/source/ui/tabledesign/
===============================================

File [changed]: TableRowExchange.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/tabledesign/TableRowExchange.cxx?r1=1.2&r2=1.3
Delta lines:  +4 -7
-------------------
--- TableRowExchange.cxx        8 Sep 2005 16:42:50 -0000       1.2
+++ TableRowExchange.cxx        4 May 2006 08:51:12 -0000       1.3
@@ -49,7 +49,7 @@
 {
        using namespace ::com::sun::star::uno;
        using namespace ::com::sun::star::beans;
-       OTableRowExchange::OTableRowExchange(const ::std::vector<OTableRow*>& 
_rvTableRow)
+       OTableRowExchange::OTableRowExchange(const ::std::vector< 
::boost::shared_ptr<OTableRow> >& _rvTableRow)
                : m_vTableRow(_rvTableRow)
        {
        }
@@ -58,11 +58,11 @@
        {
                if(nUserObjectId == SOT_FORMATSTR_ID_SBA_TABED)
                {
-                       ::std::vector<OTableRow*>* pRows = reinterpret_cast< 
::std::vector<OTableRow*>* >(pUserObject);
+                       ::std::vector< ::boost::shared_ptr<OTableRow> >* pRows 
= reinterpret_cast< ::std::vector< ::boost::shared_ptr<OTableRow> >* 
>(pUserObject);
                        if(pRows)
                        {
                                (*rxOStm) << (sal_Int32)pRows->size(); // first 
stream the size
-                               ::std::vector<OTableRow*>::const_iterator aIter 
= pRows->begin();
+                               ::std::vector< ::boost::shared_ptr<OTableRow> 
>::const_iterator aIter = pRows->begin();
                                for(;aIter != pRows->end();++aIter)
                                        (*rxOStm) << *(*aIter);
                                return sal_True;
@@ -73,7 +73,7 @@
        // 
-----------------------------------------------------------------------------
        void OTableRowExchange::AddSupportedFormats()
        {
-               if(m_vTableRow.size())
+               if ( !m_vTableRow.empty() )
                        AddFormat(SOT_FORMATSTR_ID_SBA_TABED);
        }
        // 
-----------------------------------------------------------------------------
@@ -87,9 +87,6 @@
        // 
-----------------------------------------------------------------------------
        void OTableRowExchange::ObjectReleased()
        {
-               ::std::vector<OTableRow*>::iterator aIter = m_vTableRow.begin();
-               for(;aIter != m_vTableRow.end();++aIter)
-                       delete *aIter;
                m_vTableRow.clear();
        }
        // 
-----------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to