1 diff --git sc/inc/dpgroup.hxx sc/inc/dpgroup.hxx
2 index 0aab7c8..e98a248 100644
9 +#include <boost/shared_ptr.hpp>
11 #include "dptabdat.hxx"
13 @@ -183,7 +183,7 @@ class ScDPGroupTableData : public ScDPTableData
15 typedef ::std::hash_set< ::rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > StringHashSet;
17 - ScDPTableData* pSourceData;
18 + ::boost::shared_ptr<ScDPTableData> pSourceData;
20 ScDPGroupDimensionVec aGroups;
21 ScDPNumGroupDimension* pNumGroups; // array[nSourceCount]
22 @@ -201,7 +201,7 @@ class ScDPGroupTableData : public ScDPTableData
25 // takes ownership of pSource
26 - ScDPGroupTableData( ScDPTableData* pSource, ScDocument* pDocument );
27 + ScDPGroupTableData( const ::boost::shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument );
28 virtual ~ScDPGroupTableData();
30 void AddGroupDimension( const ScDPGroupDimension& rGroup );
31 diff --git sc/inc/dpobject.hxx sc/inc/dpobject.hxx
32 index 854e1da..503c531 100644
33 --- sc/inc/dpobject.hxx
34 +++ sc/inc/dpobject.hxx
36 #include "dpoutput.hxx"
37 #include <com/sun/star/sheet/XDimensionsSupplier.hpp>
40 +#include <boost/shared_ptr.hpp>
42 //------------------------------------------------------------------
44 @@ -104,7 +104,7 @@ private:
45 ScSheetSourceDesc* pSheetDesc; // for sheet data
46 ScImportSourceDesc* pImpDesc; // for database data
47 ScDPServiceDesc* pServDesc; // for external service
48 - ::std::auto_ptr<ScDPTableData> mpTableData;
49 + ::boost::shared_ptr<ScDPTableData> mpTableData;
51 com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier> xSource;
53 diff --git sc/source/core/data/dpgroup.cxx sc/source/core/data/dpgroup.cxx
54 index 8b4bb57..cbb03ba 100644
55 --- sc/source/core/data/dpgroup.cxx
56 +++ sc/source/core/data/dpgroup.cxx
57 @@ -70,6 +70,7 @@ using ::rtl::OUStringHash;
59 using ::std::hash_set;
60 using ::std::hash_map;
61 +using ::boost::shared_ptr;
63 #define D_TIMEFACTOR 86400.0
65 @@ -978,7 +978,7 @@ String lcl_GetNumGroupForValue( double fValue, const ScDPNumGroupInfo& rInfo, bo
66 return lcl_GetNumGroupName( fGroupStart, rInfo, bHasNonInteger, cDecSeparator, pFormatter );
69 -ScDPGroupTableData::ScDPGroupTableData( ScDPTableData* pSource, ScDocument* pDocument ) :
70 +ScDPGroupTableData::ScDPGroupTableData( const shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument ) :
71 ScDPTableData(pDocument),
72 pSourceData( pSource ),
74 @@ -993,7 +993,6 @@ ScDPGroupTableData::ScDPGroupTableData( ScDPTableData* pSource, ScDocument* pDoc
75 ScDPGroupTableData::~ScDPGroupTableData()
81 void ScDPGroupTableData::AddGroupDimension( const ScDPGroupDimension& rGroup )
82 diff --git sc/source/core/data/dpobject.cxx sc/source/core/data/dpobject.cxx
83 index 7e977f0..cd4dcd1 100644
84 --- sc/source/core/data/dpobject.cxx
85 +++ sc/source/core/data/dpobject.cxx
88 using namespace com::sun::star;
90 -using ::std::auto_ptr;
91 +using ::boost::shared_ptr;
92 using ::com::sun::star::uno::Sequence;
93 using ::com::sun::star::uno::Reference;
94 using ::com::sun::star::uno::UNO_QUERY;
95 @@ -163,7 +163,7 @@ ScDPObject::ScDPObject( ScDocument* pD ) :
100 + mpTableData(static_cast<ScDPTableData*>(NULL)),
102 nAutoFormatIndex( 65535 ),
103 bSettingsChanged( FALSE ),
104 @@ -186,7 +186,7 @@ ScDPObject::ScDPObject(const ScDPObject& r) :
109 + mpTableData(static_cast<ScDPTableData*>(NULL)),
111 bSettingsChanged( FALSE ),
113 @@ -414,7 +414,7 @@ void ScDPObject::CreateOutput()
115 ScDPTableData* ScDPObject::GetTableData()
117 - if (!mpTableData.get())
122 @@ -435,7 +435,7 @@ ScDPTableData* ScDPObject::GetTableData()
123 // grouping (for cell or database data)
124 if ( pSaveData && pSaveData->GetExistingDimensionData() )
126 - auto_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(mpTableData.release(), pDoc));
127 + shared_ptr<ScDPGroupTableData> pGroupData(new ScDPGroupTableData(mpTableData, pDoc));
128 pSaveData->GetExistingDimensionData()->WriteToData(*pGroupData);
129 mpTableData = pGroupData;