[PATCH 07/31] Replace ScfRef with boost in xeescher

Nigel Hawkins n.hawkins at gmx.com
Thu Nov 18 09:55:54 PST 2010


---
 sc/source/filter/excel/xeescher.cxx |    9 +++++----
 sc/source/filter/inc/xeescher.hxx   |   17 +++++++++--------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 6181118..52ad675 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -89,6 +89,7 @@
 #include <oox/export/drawingml.hxx>
 #include <oox/export/chartexport.hxx>
 #include <oox/export/utils.hxx>
+#include <boost/shared_ptr.hpp>
 
 using ::rtl::OString;
 using ::rtl::OUString;
@@ -1557,9 +1558,9 @@ XclExpDffAnchorBase* XclExpObjectManager::CreateDffAnchor() const
     return new XclExpDffSheetAnchor( GetRoot() );
 }
 
-ScfRef< XclExpRecordBase > XclExpObjectManager::CreateDrawingGroup()
+boost::shared_ptr< XclExpRecordBase > XclExpObjectManager::CreateDrawingGroup()
 {
-    return ScfRef< XclExpRecordBase >( new XclExpMsoDrawingGroup( *mxEscherEx ) );
+    return boost::shared_ptr< XclExpRecordBase >( new XclExpMsoDrawingGroup( *mxEscherEx ) );
 }
 
 void XclExpObjectManager::StartSheet()
@@ -1567,7 +1568,7 @@ void XclExpObjectManager::StartSheet()
     mxObjList.reset( new XclExpObjList( GetRoot(), *mxEscherEx ) );
 }
 
-ScfRef< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( SdrPage* pSdrPage )
+boost::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( SdrPage* pSdrPage )
 {
     if( pSdrPage )
         mxEscherEx->AddSdrPage( *pSdrPage );
@@ -1579,7 +1580,7 @@ ScfRef< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( SdrPage* pSdrPag
     return mxObjList;
 }
 
-ScfRef< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const Reference< XShapes >& rxShapes )
+boost::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const Reference< XShapes >& rxShapes )
 {
     if( rxShapes.is() )
         mxEscherEx->AddUnoShapes( rxShapes );
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index 1e6178e..34c80c4 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -35,6 +35,7 @@
 #include "xlescher.hxx"
 #include <com/sun/star/chart/XChartDocument.hpp>
 #include "svx/sdtaitm.hxx"
+#include <boost/shared_ptr.hpp>
 
 
 namespace com { namespace sun { namespace star {
@@ -330,7 +331,7 @@ public:
     void WriteShapeTransformation( sax_fastparser::FSHelperPtr pFS, const XShapeRef& rXShape, sal_Bool bFlipH = false, sal_Bool bFlipV = false, sal_Int32 nRotation = 0 );
 
 private:
-    typedef ScfRef< XclExpChart > XclExpChartRef;
+    typedef boost::shared_ptr< XclExpChart > XclExpChartRef;
     XclExpChartRef      mxChart;        /// The chart itself (BOF/EOF substream data).
     XShapeRef mxShape;
     XChartDocRef mxChartDoc;
@@ -423,17 +424,17 @@ public:
 
     /** Creates and returns the MSODRAWINGGROUP record containing global DFF
         data in the DGGCONTAINER. */
-    ScfRef< XclExpRecordBase > CreateDrawingGroup();
+    boost::shared_ptr< XclExpRecordBase > CreateDrawingGroup();
 
     /** Initializes the object manager for a new sheet. */
     void                StartSheet();
 
     /** Processes a drawing page and returns the record block containing all
         related records (MSODRAWING, OBJ, TXO, charts, etc.). */
-    ScfRef< XclExpRecordBase > ProcessDrawing( SdrPage* pSdrPage );
+    boost::shared_ptr< XclExpRecordBase > ProcessDrawing( SdrPage* pSdrPage );
     /** Processes a collection of UNO shapes and returns the record block
         containing all related records (MSODRAWING, OBJ, TXO, charts, etc.). */
-    ScfRef< XclExpRecordBase > ProcessDrawing( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
+    boost::shared_ptr< XclExpRecordBase > ProcessDrawing( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
 
     /** Finalizes the object manager after conversion of all sheets. */
     void                EndDocument();
@@ -451,10 +452,10 @@ private:
     void                InitStream( bool bTempFile );
 
 private:
-    ScfRef< ::utl::TempFile > mxTempFile;
-    ScfRef< SvStream >  mxDffStrm;
-    ScfRef< XclEscherEx > mxEscherEx;
-    ScfRef< XclExpObjList > mxObjList;
+    boost::shared_ptr< ::utl::TempFile > mxTempFile;
+    boost::shared_ptr< SvStream >  mxDffStrm;
+    boost::shared_ptr< XclEscherEx > mxEscherEx;
+    boost::shared_ptr< XclExpObjList > mxObjList;
 };
 
 // ----------------------------------------------------------------------------
-- 
1.7.0.4


--=-qLwfU1BKYMIcJNs5pkFI
Content-Disposition: attachment; filename="0008-Replace-ScfRef-with-boost-in-xeformula.patch"
Content-Type: text/x-patch; name="0008-Replace-ScfRef-with-boost-in-xeformula.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the LibreOffice mailing list