sc/inc/dpgroup.hxx | 3 ++- sc/inc/dptablecache.hxx | 14 +++++++++----- sc/inc/dptabres.hxx | 13 ++++++++----- sc/inc/dptabsrc.hxx | 2 ++ sc/source/core/data/dpcachetable.cxx | 1 + sc/source/core/data/dpoutput.cxx | 1 - sc/source/core/data/dpsave.cxx | 1 - sc/source/core/data/dpshttab.cxx | 1 - sc/source/core/data/dptablecache.cxx | 10 ++++++---- sc/source/core/data/dptabres.cxx | 10 ++++++---- sc/source/core/data/dptabsrc.cxx | 4 +++- sc/source/core/data/global2.cxx | 1 - sc/source/ui/inc/fieldwnd.hxx | 2 +- 13 files changed, 38 insertions(+), 25 deletions(-)
New commits: commit bef2d8a6f5a8d75f5b8721f1a3a068cabdd96b02 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Thu Feb 9 15:45:29 2012 -0500 Cleaned up more header include silliness. diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 8f69828..bf7bea0 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -35,6 +35,7 @@ #include "dptabdat.hxx" #include "scdllapi.h" +#include "dpitemdata.hxx" class ScDocument; class SvNumberFormatter; diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx index 54304f6..8934af6 100644 --- a/sc/inc/dptablecache.hxx +++ b/sc/inc/dptablecache.hxx @@ -30,7 +30,6 @@ #define SC_DPTABLECACHE_HXX #include "global.hxx" -#include "dpitemdata.hxx" #include <svl/zforlist.hxx> @@ -38,17 +37,22 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XRowSet.hpp> -#include <vector> +#include <boost/noncopyable.hpp> +#include <boost/scoped_ptr.hpp> #include <boost/ptr_container/ptr_vector.hpp> +#include <vector> + struct ScQueryParam; class ScDPObject; +class ScDPItemDataPool; +class ScDPItemData; /** * This class represents the cached data part of the datapilot cache table * implementation. */ -class SC_DLLPUBLIC ScDPCache +class SC_DLLPUBLIC ScDPCache : boost::noncopyable { public: typedef ::boost::ptr_vector<ScDPItemData> DataListType; @@ -93,7 +97,7 @@ private: DataListType maLabelNames; // Stores dimension names. std::vector<bool> mbEmptyRow; // Keeps track of empty rows. - mutable ScDPItemDataPool maAdditionalData; + boost::scoped_ptr<ScDPItemDataPool> mpAdditionalData; bool mbDisposing; diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index f5c10a2..80e77cc 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -29,17 +29,20 @@ #ifndef SC_DPTABRES_HXX #define SC_DPTABRES_HXX +#include "global.hxx" +#include "dpcachetable.hxx" + #include <svl/svarray.hxx> #include <tools/string.hxx> #include <com/sun/star/sheet/MemberResult.hpp> #include <com/sun/star/sheet/DataResult.hpp> #include <com/sun/star/uno/Sequence.hxx> -#include "global.hxx" // enum ScSubTotalFunc -#include "dpcachetable.hxx" + #include <boost/unordered_map.hpp> #include <boost/unordered_set.hpp> #include <vector> #include <memory> +#include <map> namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotFieldReference; @@ -499,9 +502,9 @@ typedef std::vector<ScDPDataMember*> ScDPDataMembers; class ScDPResultDimension { -public : - typedef std::vector <ScDPResultMember *> MemberArray; - typedef std::map < SCROW , ScDPResultMember *> MemberHash; +public: + typedef std::vector<ScDPResultMember*> MemberArray; + typedef std::map<SCROW, ScDPResultMember*> MemberHash; private: const ScDPResultData* pResultData; MemberArray maMemberArray; diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index ae9ca76..db0bcb4 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -35,6 +35,7 @@ #include "dpobject.hxx" #include "queryparam.hxx" #include "queryentry.hxx" +#include "dpitemdata.hxx" #include <com/sun/star/i18n/LocaleDataItem.hpp> #include <com/sun/star/sdbc/DataType.hpp> diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index e81d3a5..07b942f 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -36,6 +36,7 @@ #include "dpobject.hxx" #include "globstr.hrc" #include "docoptio.hxx" +#include "dpitemdata.hxx" #include <rtl/math.hxx> #include <unotools/textsearch.hxx> @@ -223,6 +224,7 @@ bool ScDPCache::operator== ( const ScDPCache& r ) const ScDPCache::ScDPCache(ScDocument* pDoc) : mpDoc( pDoc ), mnColumnCount ( 0 ), + mpAdditionalData(new ScDPItemDataPool), mbDisposing(false) { } @@ -682,7 +684,7 @@ SCROW ScDPCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty) const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const { if ( nId >= GetRowCount() ) - return maAdditionalData.getData( nId - GetRowCount() ); + return mpAdditionalData->getData(nId - GetRowCount()); if ( (size_t)nId >= maTableDataValues[nDim].size() || nDim >= mnColumnCount || nId < 0 ) return NULL; @@ -799,7 +801,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const String& sItemData ) const } ScDPItemData rData ( sItemData ); - return GetRowCount() +maAdditionalData.getDataId(rData); + return GetRowCount() + mpAdditionalData->getDataId(rData); } SCROW ScDPCache::GetIdByItemData( long nDim, const ScDPItemData& rData ) const @@ -812,12 +814,12 @@ SCROW ScDPCache::GetIdByItemData( long nDim, const ScDPItemData& rData ) const return i; } } - return GetRowCount() + maAdditionalData.getDataId(rData); + return GetRowCount() + mpAdditionalData->getDataId(rData); } SCROW ScDPCache::GetAdditionalItemID( const ScDPItemData& rData ) const { - return GetRowCount() + maAdditionalData.insertData( rData ); + return GetRowCount() + mpAdditionalData->insertData(rData); } diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 114aa15..51dd43d 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -31,21 +31,23 @@ // INCLUDE --------------------------------------------------------------- -#include <osl/diagnose.h> -#include <rtl/math.hxx> -#include <rtl/strbuf.hxx> +#include "dptabres.hxx" #include "dptabdat.hxx" -#include "dptabres.hxx" #include "dptabsrc.hxx" #include "global.hxx" #include "subtotal.hxx" #include "globstr.hrc" #include "datauno.hxx" // ScDataUnoConversion +#include "dpitemdata.hxx" #include "document.hxx" // for DumpState only! #include "stlalgorithm.hxx" +#include <osl/diagnose.h> +#include <rtl/math.hxx> +#include <rtl/strbuf.hxx> + #include <math.h> #include <float.h> //! Test !!! #include <algorithm> diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 199e457..1be8909 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -32,6 +32,8 @@ // INCLUDE --------------------------------------------------------------- +#include "dptabsrc.hxx" + #include <algorithm> #include <vector> #include <set> @@ -49,13 +51,13 @@ #include "patattr.hxx" #include "cell.hxx" -#include "dptabsrc.hxx" #include "dptabres.hxx" #include "dptabdat.hxx" #include "global.hxx" #include "datauno.hxx" // ScDataUnoConversion #include "miscuno.hxx" #include "unonames.hxx" +#include "dpitemdata.hxx" #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/sheet/DataPilotFieldFilter.hpp> commit 950f94c03a10977c0a5e08455bb49c192c3c6a36 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Thu Feb 9 15:34:14 2012 -0500 Include dpglobal.hxx only when necessary. diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index ada526c..8f69828 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -35,7 +35,7 @@ #include "dptabdat.hxx" #include "scdllapi.h" -#include "dpglobal.hxx" + class ScDocument; class SvNumberFormatter; diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx index 3238405..54304f6 100644 --- a/sc/inc/dptablecache.hxx +++ b/sc/inc/dptablecache.hxx @@ -30,10 +30,10 @@ #define SC_DPTABLECACHE_HXX #include "global.hxx" -#include <svl/zforlist.hxx> -#include "dpglobal.hxx" #include "dpitemdata.hxx" +#include <svl/zforlist.hxx> + #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XRowSet.hpp> diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 8a57d70..43869ee 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -60,7 +60,9 @@ #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/implbase6.hxx> + #include "dptabdat.hxx" +#include "dpglobal.hxx" namespace com { namespace sun { namespace star { namespace sheet { diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 5bbf53a..78ef4e6 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -53,7 +53,6 @@ #include "scresid.hxx" #include "unonames.hxx" #include "sc.hrc" -#include "dpglobal.hxx" #include "stringutil.hxx" #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx index b9b1b71..e27ef45 100644 --- a/sc/source/core/data/dpsave.cxx +++ b/sc/source/core/data/dpsave.cxx @@ -52,7 +52,6 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/util/XCloneable.hpp> #include "dptabsrc.hxx" -#include "dpglobal.hxx" #include <com/sun/star/sheet/DataPilotFieldReferenceType.hpp> #include <com/sun/star/sheet/DataPilotFieldReferenceItemType.hpp> diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 941e629..b0e2ffe 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -40,7 +40,6 @@ #include "dpcachetable.hxx" #include "dpobject.hxx" #include "globstr.hrc" -#include "dpglobal.hxx" #include "rangenam.hxx" #include "queryentry.hxx" diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index e370f7e..47fd6a1 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -44,7 +44,6 @@ #include "rechead.hxx" #include "compiler.hxx" #include "paramisc.hxx" -#include "dpglobal.hxx" #include "pivot.hxx" #include "sc.hrc" diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx index 49fc2ed..e1bcfdb 100644 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -31,7 +31,7 @@ #include <vector> #include "address.hxx" -#include "dpglobal.hxx" + #include <vcl/ctrl.hxx> #include <vcl/fixed.hxx> #include <vcl/scrbar.hxx> _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits