[Libreoffice-commits] .: sc/inc sc/qa sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Nov 23 20:49:09 PST 2011


 sc/inc/table.hxx                  |   35 +++++++++++++++--------------------
 sc/qa/unit/ucalc.cxx              |    1 +
 sc/source/core/data/cell.cxx      |    2 ++
 sc/source/core/data/table1.cxx    |    1 +
 sc/source/core/data/table2.cxx    |    1 +
 sc/source/ui/vba/vbaworksheet.cxx |    1 +
 6 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit 92e03b82880ab1c83a1bfd59e179e3fb9f565257
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Nov 23 23:34:18 2011 -0500

    Cleaned up the ScTable declaration a bit.
    
    * make it officially non-copyable. It was never copied anyway.
    * retire std::auto_ptr which is deprecated.  Let's use boost::scoped_ptr.
    * some unused typedef's.

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 906d306..af57e62 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -30,7 +30,6 @@
 #define SC_TABLE_HXX
 
 #include <vector>
-#include <memory>
 #include <utility>
 #include <tools/gen.hxx>
 #include <tools/color.hxx>
@@ -38,11 +37,10 @@
 #include "column.hxx"
 #include "sortparam.hxx"
 #include "compressedarray.hxx"
-#include "dbdata.hxx"
 
-#include <memory>
 #include <set>
-#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
 
 namespace utl {
     class TextSearch;
@@ -89,28 +87,25 @@ struct ScSetStringParam;
 struct ScColWidthParam;
 struct ScColWidthParam;
 class ScRangeName;
+class ScDBData;
 
-typedef boost::unordered_map< ::rtl::OUString, rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > NameToNameMap;
-
-class ScTable
+class ScTable : boost::noncopyable
 {
 private:
     typedef ::std::vector< ScRange > ScRangeVec;
     typedef ::std::pair< SCCOL, SCROW > ScAddress2D;
     typedef ::std::vector< ScAddress2D > ScAddress2DVec;
-    typedef ::std::auto_ptr< ScAddress2DVec > ScAddress2DVecPtr;
 
-                                            //  data per table
     ScColumn        aCol[MAXCOLCOUNT];
 
     rtl::OUString aName;
     rtl::OUString aCodeName;
     rtl::OUString aComment;
 
-    rtl::OUString          aLinkDoc;
-    rtl::OUString          aLinkFlt;
-    rtl::OUString          aLinkOpt;
-    rtl::OUString          aLinkTab;
+    rtl::OUString       aLinkDoc;
+    rtl::OUString       aLinkFlt;
+    rtl::OUString       aLinkOpt;
+    rtl::OUString       aLinkTab;
     sal_uLong           nLinkRefreshDelay;
     sal_uInt8           nLinkMode;
 
@@ -122,17 +117,17 @@ private:
     SCROW           nRepeatStartY;
     SCROW           nRepeatEndY;
 
-    ::std::auto_ptr<ScTableProtection> pTabProtection;
+    boost::scoped_ptr<ScTableProtection> pTabProtection;
 
     sal_uInt16*         pColWidth;
-    ::boost::shared_ptr<ScFlatUInt16RowSegments> mpRowHeights;
+    boost::scoped_ptr<ScFlatUInt16RowSegments> mpRowHeights;
 
     sal_uInt8*          pColFlags;
     ScBitMaskCompressedArray< SCROW, sal_uInt8>*     pRowFlags;
-    ::boost::shared_ptr<ScFlatBoolColSegments>  mpHiddenCols;
-    ::boost::shared_ptr<ScFlatBoolRowSegments>  mpHiddenRows;
-    ::boost::shared_ptr<ScFlatBoolColSegments>  mpFilteredCols;
-    ::boost::shared_ptr<ScFlatBoolRowSegments>  mpFilteredRows;
+    boost::scoped_ptr<ScFlatBoolColSegments>  mpHiddenCols;
+    boost::scoped_ptr<ScFlatBoolRowSegments>  mpHiddenRows;
+    boost::scoped_ptr<ScFlatBoolColSegments>  mpFilteredCols;
+    boost::scoped_ptr<ScFlatBoolRowSegments>  mpFilteredRows;
 
     ::std::set<SCROW>                      maRowPageBreaks;
     ::std::set<SCROW>                      maRowManualBreaks;
@@ -153,7 +148,7 @@ private:
 
     mutable rtl::OUString aUpperName;             // #i62977# filled only on demand, reset in SetName
 
-    ScAddress2DVecPtr mxUninitNotes;
+    boost::scoped_ptr<ScAddress2DVec> mxUninitNotes;
 
     // sort parameter to minimize stack size of quicksort
     ScSortParam     aSortParam;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9b0cbcc..21914d9 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -46,6 +46,7 @@
 #include "queryentry.hxx"
 #include "postit.hxx"
 #include "attrib.hxx"
+#include "dbdata.hxx"
 
 #include "docsh.hxx"
 #include "docfunc.hxx"
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 88fcbfd..9267133 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -53,6 +53,8 @@
 #include "postit.hxx"
 #include "externalrefmgr.hxx"
 #include "macromgr.hxx"
+#include "dbdata.hxx"
+
 #include <editeng/editobj.hxx>
 #include <svl/intitem.hxx>
 #include <editeng/flditem.hxx>
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 0505da7..e88fba6 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -55,6 +55,7 @@
 #include "tabprotection.hxx"
 #include "sheetevents.hxx"
 #include "segmenttree.hxx"
+#include "dbdata.hxx"
 
 #include <vector>
 
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index beb638b..75b5c44 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -62,6 +62,7 @@
 #include "segmenttree.hxx"
 #include "queryparam.hxx"
 #include "queryentry.hxx"
+#include "dbdata.hxx"
 
 // STATIC DATA -----------------------------------------------------------
 
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index cea1ee5..5ccab92 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -109,6 +109,7 @@
 #include "vbasheetobjects.hxx"
 #include "viewuno.hxx"
 #include "markdata.hxx"
+#include "dbdata.hxx"
 
 #include "attrib.hxx"
 


More information about the Libreoffice-commits mailing list