diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-23 23:34:18 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-23 23:34:18 -0500 |
commit | 92e03b82880ab1c83a1bfd59e179e3fb9f565257 (patch) | |
tree | d96c4e3098dc2e52b2b44c5bbb3065557416be29 | |
parent | c4a3e29626126658cfb9e8755e9f98cfc4500abd (diff) |
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.
-rw-r--r-- | sc/inc/table.hxx | 35 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/cell.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table1.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworksheet.cxx | 1 |
6 files changed, 21 insertions, 20 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 906d3064fe55..af57e621fd17 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 9b0cbcc7962a..21914d99e503 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 88fcbfd631e8..926713387b74 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 0505da75432a..e88fba61c1e5 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 beb638bf7660..75b5c4460a25 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 cea1ee53440f..5ccab929c129 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" |